Re: Height:100% - XXXpx CSS issue
- From: dorayme <doraymeRidThis@xxxxxxxxxxxxxxx>
- Date: Wed, 24 Sep 2008 13:08:37 +1000
In article
<52c5d17b-f2da-4686-85b8-6600b107e547@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
msoliver <michaelsoliver@xxxxxxxxx> wrote:
On Sep 23, 6:44 pm, dorayme <doraymeRidT...@xxxxxxxxxxxxxxx> wrote:
In article
<c7b0dac0-dbc9-44cf-9a06-576cfef57...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
msoliver <michaelsoli...@xxxxxxxxx> wrote:
Okay, I believe this is one of the biggest issues found using CSS/DIV
layout. But, I haven't found a non-Javascript solution.
I would like two DIVs - first DIV, say with a height of 20px. The
second DIV with a height of 100% (the rest of the viewport).
There are different ways to skin this cat (your description is not quite
accurate but I sort of know what you mean).
This looks ok in FF 3, Safari 3 and iCab 4, Opera 9.5:
<http://dorayme.890m.com/alt/px_percent_heights.html>
--
dorayme
Thanks, but unfortunately, there is a problem with your solution:
DIV top is 20 px high and DIV rest is 100% high.
which was one of your descriptions. You see, there is a contradiction in
your description and I took one of the horns on the principle of
charitable interpreation. You said 100% and I assumed this is 100% of
viewport. True, you also said the second div should be "the rest"
implying viewport minus 20px. But no one can know what percentage this
is so unless one knows exactly what the user has opened his browser to
(js come to mind). Why did you mention a percentage? Surely not for the
vacuous reason that anything at all is 100% of what it is?
DIV rest appears to
be 100% - 20px, but it's the full height of the viewport. You can see
this if you remove the background of the top div. So, what's going on
is the top DIV is 20px and then the rest DIV is just layered
underneath the top DIV, but takes 100% of the viewport. The padding-
top: 20px makes the DIV rest content display in the right place, but
when I replace it with real content, it's clear that the height is
off...
When you replace the 20px high dive with real content? You can't get
much content in 20px high!
Is there a chance that you can post a URL with almost the same length
and type of content you want. Otherwise we are just playing theoretical
games with not quite well defined parameters. It is best for me to
understand what you are wanting to do on the whole. I gave you 100% div,
I gave you 20px div and like little Thomas the Tank Engine, I tried my
very best
--
dorayme
.
- Follow-Ups:
- Re: Height:100% - XXXpx CSS issue
- From: msoliver
- Re: Height:100% - XXXpx CSS issue
- References:
- Height:100% - XXXpx CSS issue
- From: msoliver
- Re: Height:100% - XXXpx CSS issue
- From: dorayme
- Re: Height:100% - XXXpx CSS issue
- From: msoliver
- Height:100% - XXXpx CSS issue
- Prev by Date: Re: Height:100% - XXXpx CSS issue
- Next by Date: Re: Height:100% - XXXpx CSS issue
- Previous by thread: Re: Height:100% - XXXpx CSS issue
- Next by thread: Re: Height:100% - XXXpx CSS issue
- Index(es):