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.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    You're welcome.

    If the footer, content and footer sections are separate (not nested) then any background colour or image won't spill over the sections.

    By setting the heights of the html and body to 100% the body will fill the viewport (to the bottom of the screen). You could then use a background colour for the body which will fill the remainder of the page.
    Code:
    html {
        height: 100%;
    }
    body {
        background-color: lightblue;
        height: 100%;
    }
    But you would need to ensure that each of the preceding sections have no margins and have either a background colour or image - otherwise the body colour will show through these, earlier than you intend. Andy.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  2. Users who have thanked AndrewGSW for this post:

    Psionicsin (06-07-2011)

  3. #17
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by AndrewGSW View Post
    You're welcome.

    If the footer, content and footer sections are separate (not nested) then any background colour or image won't spill over the sections.

    By setting the heights of the html and body to 100% the body will fill the viewport (to the bottom of the screen). You could then use a background colour for the body which will fill the remainder of the page.
    Code:
    html {
        height: 100%;
    }
    body {
        background-color: lightblue;
        height: 100%;
    }
    But you would need to ensure that each of the preceding sections have no margins and have either a background colour or image - otherwise the body colour will show through these, earlier than you intend. Andy.
    Well I'm not 100% on what happened meaning if I did something right, or if I did it right on mistake, but
    THIS
    seems to be doing what I wanted. I colored the body blue just to make sure I could see everything before I started adding things to it.

    But, yeah if I change the color of the body to #eeeeee then it looks exactly how I want it to.

  4. #18
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    As long as you're happy

    I'm not so keen on the floating of the header - it seems unnatural and shouldn't be necessary.

    Also, setting widths of 100% shouldn't be necessasry for block elements as it is their default behaviour.

    Good luck! Andy.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  5. Users who have thanked AndrewGSW for this post:

    Psionicsin (06-07-2011)


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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