Connecting Tech Pros Worldwide Help | Site Map

final height: 100% question

esingley@gmail.com
Guest
 
Posts: n/a
#1: Nov 23 '05
I've done a lot of poking around the web and this newsgroup and have
seen a number of answers to this question. But, I wanted to appeal to
the experts here one last time before I decide to let the issue go and
move on.

Here's the deal: I have a DIV that I want to stretch to 100% of the
height the page. Not just the viewport, but the page. When there is
content that extends past the viewport, I have to remove all the
height: 100% attributes from my html, body and div CSS definitions, and
it works fine. This is shown here:

http://www.singley.org/pilcrows/test_bg.html

However, if I have a page with not enough content to extend to the
bottom of the page, then, of course, this doesn't work. Like here:

http://www.singley.org/pilcrows/test_bg2.html

To fix this second example, I'd need to add the height attributes back.

So, the question: am I stuck adding height attributes to individual
pages that don't have enough content to extend the DIV to the bottom of
the page? I can live with that, I just want to know for sure if that's
my only solution.

Thanks!

Spartanicus
Guest
 
Posts: n/a
#2: Nov 23 '05

re: final height: 100% question


esingley@gmail.com wrote:
[color=blue]
>So, the question: am I stuck adding height attributes to individual
>pages that don't have enough content to extend the DIV to the bottom of
>the page?[/color]

html,body{height:100%}
div{min-height:100%}

--
Spartanicus
esingley@gmail.com
Guest
 
Posts: n/a
#3: Nov 23 '05

re: final height: 100% question


GENIUS. That was the pearl of wisdom I was looking for. No idea why
it didn't turn up in my searching...Must have been looking for the
wrong things.

Thanks so much!

Gus Richter
Guest
 
Posts: n/a
#4: Nov 23 '05

re: final height: 100% question


esingley@gmail.com wrote:[color=blue]
> GENIUS. That was the pearl of wisdom I was looking for. No idea why
> it didn't turn up in my searching...Must have been looking for the
> wrong things.
>
> Thanks so much![/color]

Yea right! Two days ago with "height" in subject!

--
Gus
esingley@gmail.com
Guest
 
Posts: n/a
#5: Nov 23 '05

re: final height: 100% question


OK, looks like I spoke too soon. The "long" version works fine in
Firefox and IE6:

http://www.singley.org/pilcrows/test_bg.html

But the "short" version isn't working how I want it to in IE:

http://www.singley.org/pilcrows/test_bg2.html

I want the center box to extend to the bottom of the page even when
there isn't content there, and right now that's only happening in
Firefox.

Thanks in advance for another look at this one,

~ Eric

Spartanicus wrote:[color=blue]
> esingley@gmail.com wrote:
>[color=green]
> >So, the question: am I stuck adding height attributes to individual
> >pages that don't have enough content to extend the DIV to the bottom of
> >the page?[/color]
>
> html,body{height:100%}
> div{min-height:100%}
>
> --
> Spartanicus[/color]

Spartanicus
Guest
 
Posts: n/a
#6: Nov 23 '05

re: final height: 100% question


Please do not top post, and strip sigs given that Google Groups seems to
dumb to do that for you. I've manually restored proper quote order this
once.
[color=blue]
>Spartanicus wrote:[color=green]
>> esingley@gmail.com wrote:
>>[color=darkred]
>> >So, the question: am I stuck adding height attributes to individual
>> >pages that don't have enough content to extend the DIV to the bottom of
>> >the page?[/color]
>>
>> html,body{height:100%}
>> div{min-height:100%}[/color][/color]

esingley@gmail.com wrote:
[color=blue]
>OK, looks like I spoke too soon. The "long" version works fine in
>Firefox and IE6:
>
>http://www.singley.org/pilcrows/test_bg.html
>
>But the "short" version isn't working how I want it to in IE:
>
>http://www.singley.org/pilcrows/test_bg2.html
>
>I want the center box to extend to the bottom of the page even when
>there isn't content there, and right now that's only happening in
>Firefox.[/color]

I thought it was obvious from the usage of min-height that it wouldn't
work in IE without adding one of the available workarounds for that.

Try this if you don't know how to do that:
http://homepage.ntlworld.ie/spartanicus/temp.htm

--
Spartanicus
Closed Thread