Friday, March 19, 2010

Style Overflow for div

If you like to see scrolls inside a div tag when the contents of the same exceed ,
you can mention the following style for that specific div tag,

overflow: auto;
overflow-x:  auto;<- for horizontal scrolling
overflow-y:  auto;<- for vertical scrolling

If you always want to see a scroll then,

overflow: scroll;

overflow-x:  scroll;<- for horizontal scrolling
overflow-y:  scroll;<- for vertical scrolling

If you never like a scroll in your div tag no matter what then,

overflow: hidden;

overflow-x:  hidden;<- for horizontal scrolling
overflow-y:  hidden;<- for vertical scrolling

Hope this helps ;-)

No comments:

Post a Comment