is it possible to have a minium height in a div but it will go bigger if needed?
is it possible to have a minium height in a div but it will go bigger if needed?
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
Yep, its pretty simple.
Just use CSS's "min-height" feature.
In a style sheet it would be like
or without a style sheet:HTML Code:div { min-height: 10px; }
You can also use this feature with percentages for instance if you wanted a div to be at least 10% of the page .HTML Code:<div style="min-height: 10px;">Content.</div>
Last edited by Josh-H; 24-12-2007 at 03:27 PM.
Excellent +rep
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
I'm not 100% sure if it works in IE without a width set, and you might need to add overflow: auto;
i ended up not needing this anyway because i changed the navi.
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
Want to hide these adverts? Register an account for free!