View Full Version : blank div used for background color, how do I make it stretch across the whole page?

09-05-2010, 03:24 AM
I'm trying to create a page where the background color changes halfway down,
like www.brianhoff.net

i've got everything in the body inside a wrapper that's sized at 800 width and whatever the height ends up at for the height,
so the page will have fixed dimensions.

I'm down where I want the background to change to black,
where in the HTML i used this:

<div id="blackness"><p><br /></p>

in the css, I did this:

#blackness {
background-color: #000;
position: relative;
padding-bottom: 100;

now this is what I'm seeing on the left side of the page,
where I don't want any sort of gap. Instead I'd like for it to be covering the whole of that section of the page from side to side.

here's what I'm seeing:


the "blackness" div is not within the sized wrapper.

what can I do?

thanks for reading it this far :D

Major Payne
09-05-2010, 07:21 AM
stu nicholls | CSS PLaY | 100% wide/high 'background' image emulation (http://www.cssplay.co.uk/layouts/background.html)

Sorry. That's not going to work for you. Mis-read the post title. Just saw "stretch across the whole page?". :P