Problem with CSS Height
Posted: Wed Jul 27, 2011 1:44 pm
Hi ,
I've been working on this for a couple days without sucess, what it is, is I'm trying to get my menu and content box to fill the remainder of the browser screen and not overspill when it doesn't need to, i.e. if i only have a couple lines of text, the browser shouldn't need to scroll down the screen when theres no content at the bottom, problem is I've set the height to be 100%, when that happens the menu disappears, if i change it to say 500px the menu appears,
If anyone could fix my problem i'd be most greatful,
Thank You,
Alex Jake.
I've been working on this for a couple days without sucess, what it is, is I'm trying to get my menu and content box to fill the remainder of the browser screen and not overspill when it doesn't need to, i.e. if i only have a couple lines of text, the browser shouldn't need to scroll down the screen when theres no content at the bottom, problem is I've set the height to be 100%, when that happens the menu disappears, if i change it to say 500px the menu appears,
If anyone could fix my problem i'd be most greatful,
Thank You,
Alex Jake.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body{ background-color:#dc8; font-size:16px; margin:0; padding:0; } #header{ background-color:#333; height:150px; } #right{ float:right; width:200px; background-color:#dc8; min-height:100%; /* for modern browsers */ height:auto !important; /* for modern browsers */ height:100%; /* for IE5 and IE6 */ } #center { margin-right:200px; background-color:#eec; min-height:100%; /* for modern browsers */ height:auto !important; /* for modern browsers */ height:100%; /* for IE5 and IE6 */ } </style> </head> <body> <div id="header"> </div> <div id="right"> </div> <div id="center"> </div> </body> </html>