I seem to have run into a problem...
If I tell a div to be say, 100% the height of the div it is contained it, it seems to work without a problem... except if the div it's contained it has been specified as a min-height.
Consider the following senario:
That works perfectly, just how I'd expect ... however if I do this:
The ONLY difference is I changed the parent div from
Funny thing is, I realized that by itself, that code will make the yellow verticals 100% of the screen instead of 100% of the div it is contained in. However I have the code usually in amongst other code, the just don't show up at all.
Any pointers would be appreciated,
Asher
If I tell a div to be say, 100% the height of the div it is contained it, it seems to work without a problem... except if the div it's contained it has been specified as a min-height.
Consider the following senario:
Code:
<html> <head> <style type="text/css"> #container { width:924px; height:568px; margin:0; border:none; background-color:#737373; } #vertical-left { width:10px; height:100%; margin:0; border:none; float:left; background-color:#E6E600; } #vertical-right { width:10px; height:100%; margin:0; border:none; float:right; background-color:#E6E600; } </style> </head> <body> <div id="div"> <div id="container"> <div id="vertical-left"> </div> <div id="vertical-right"> </div> </div> </div> </body> <html>
Code:
<html> <head> <style type="text/css"> #container { width:924px; min-height:568px; margin:0; border:none; background-color:#737373; } #vertical-left { width:10px; height:100%; margin:0; border:none; float:left; background-color:#E6E600; } #vertical-right { width:10px; height:100%; margin:0; border:none; float:right; background-color:#E6E600; } </style> </head> <body> <div id="div"> <div id="container"> <div id="vertical-left"> </div> <div id="vertical-right"> </div> </div> </div> </body> <html>
The ONLY difference is I changed the parent div from
height:568px;
to min-height:568px;
Funny thing is, I realized that by itself, that code will make the yellow verticals 100% of the screen instead of 100% of the div it is contained in. However I have the code usually in amongst other code, the just don't show up at all.
Any pointers would be appreciated,
Asher
Comment