CMellor Posted February 5, 2007 Share Posted February 5, 2007 Hello all. I am trying to make a DIV stretch to the bottom of the page on a site I am doing for a friend. I have actually managed to do it, it looks good, but the problem is that the page scrolls down a lot, when theirs nothing their to scroll down for. Here is the website. As you can see, some unwanted scrolling occurs, which I would like rid of. Here is the code I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Red Alert Fire</title> <style type="text/css"> <!-- html, body { height: 100%; } #wrapper { width: 750px; margin-left: auto; margin-right: auto; } #header { background: url(header.gif); height: 200px; } .border-l, .border-r { background: url(border.gif) left repeat-y; position: absolute; height: 100%; width: 750px; } .border-r { background: url(border.gif) right repeat-y; } --> </style> </head> <body> <div id="wrapper"> <div id="header"> </div> <div class="border-l"> <div class="border-r"> </div> </div> </div> </body> </html> If anybody would be kind enough to have a look through it and maybe guide me in the right direction, I would be most grateful. Thanks for your time, Chris. Quote Link to comment Share on other sites More sharing options...
jcombs_31 Posted February 5, 2007 Share Posted February 5, 2007 looks like it is adding the 200px header to the 100%. Your code doesn't make much sense. Drop that .border crap and apply the background image to the wrapper. You declare the same background image twice. Why do you want the page to be 100%? Let the content decide the height. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.