Posts Tagged ‘scrolling’

Scrollable Divs

Friday, January 11th, 2008

Kingston Flyer

I’ve been HTML-ing and CSS-ing for years now and had never come across this before: To make the content within a div tag (or any other block tag) scrollable all you need to do is fix the width and/or height and add overflow:scroll; to the style for the tag.

You can also set individual scrollbars with overflow-x:scroll; or overflow-x:hidden; and overflow-y:scroll; or overflow-y:hidden;.

I can’t believe I missed out on this one. Perhaps I need to go back to the CSS specification and work through each attribute one by one.