homepage Welcome to WebmasterWorld Guest from 54.196.199.46
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Problem with height: 100% rule for DIV
A DIV positioned absolute in the body
tubaman




msg:1178206
 9:28 pm on Jul 22, 2004 (gmt 0)

My xhtml page has all of the body code INSIDE a absolutely positioned DIV, with a height of 100% and a width of 800px. The div background is white, while the page background is blue.
Inside of this "body" div are two relatively-positioned divs: one with main content/navigation, and one with a footer.
I wanted the "body" div to stretch to the bottom of the screen (100%) and leave a blue column on the right (after the 800pixel div ends). The main content/navigation div should push the footer to the end of the page.
Instead, the browser ignores the div background color, and I get blue background everywhere, unless I set the "body" DIV height to a value like 400px.

Why doesn't height: 100% make the DIV go all the way down?

 

orgaseo




msg:1178207
 7:08 am on Jul 23, 2004 (gmt 0)

Because 100% of the content is using not of page/screen.

I've got the same problem here.

SuzyUK




msg:1178208
 10:49 am on Jul 27, 2004 (gmt 0)

have you got 100% height set on both the <html> and <body> elements too?

Suzy

Mobull




msg:1178209
 12:05 pm on Jul 28, 2004 (gmt 0)

yeah better make it like this:

html,body {
height: 100%;
}

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved