Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-19-2011, 09:38 PM   PM User | #16
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
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
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
Psionicsin (06-07-2011)
Old 05-20-2011, 01:00 AM   PM User | #17
Psionicsin
Regular Coder

 
Psionicsin's Avatar
 
Join Date: Aug 2010
Location: Ann Arbor, Michigan
Posts: 334
Thanks: 51
Thanked 0 Times in 0 Posts
Psionicsin is an unknown quantity at this point
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.
Psionicsin is offline   Reply With Quote
Old 05-20-2011, 02:20 AM   PM User | #18
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
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
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
Psionicsin (06-07-2011)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:20 PM.


Advertisement
Log in to turn off these ads.