scrollable div

I have a client looking for a site-template which I have almost finished. At certain parts of the site, they want the areas to be constant height/width and scrollable if anything goes further than it.

I have this:
#main_content #about_box {
color: #9f93ab;
margin-left:0px; margin-right:5px;
margin-top:10px; margin-bottom:0px;
width: 190px;
max-height: 100px;
padding-left: 5px; padding-right:5px;
display: inline-table;
padding-bottom: 10px; padding-top:10px;
overflow: scroll;

For some reason this goes way over 100px and doesn’t scroll or anything. Any ideas?

Your problem is the dual declarations for the height. CSS respects the latest definition in the CSS file so it is ignoring the 100px and is respecting the 100% so lose the 100% declaration, you don’t need it. Be aware that you probably don’t need the min-height declaration either.

Sponsor our Newsletter | Privacy Policy | Terms of Service