Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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:

    Code:
    	<div id="blackness"><p><br /></p>
    	</div>
    in the css, I did this:


    Code:
    #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:





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

    what can I do?

    thanks for reading it this far

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    845
    Thanks
    11
    Thanked 79 Times in 77 Posts
    stu nicholls | CSS PLaY | 100% wide/high 'background' image emulation

    Sorry. That's not going to work for you. Mis-read the post title. Just saw "stretch across the whole page?". :P
    Last edited by Major Payne; 09-05-2010 at 06:26 AM.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •