Friday 12 June 2015

How to make a div scroll-able?


To make div horizontally scroll-able add overflow-x:scroll style to div as:

<div style="overflow-x: scroll; width: 300px;">
In HTML, span and div elements are used to define parts of a document so that they are identifiable when no other HTML element is suitable.
<div>


To make div vertically scroll-able add overflow-y:scroll style to div as:

<div style="overflow-y: scroll; height: 300px;">
In HTML, 
span and div elements are used 
to define parts of a document 
so that they are identifiable 
when no other HTML element is suitable. 
<div>

To make div  scroll-able both horizontally & vertically then  add overflow:scroll style to div as:

<div style="overflow: scroll; height: 300px; width:400px;">
In HTML, 
span and div elements are used 
to define parts of a document 
so that they are identifiable 
when no other HTML element is suitable. 
<div>

No comments:

Post a Comment