Posted by julian.bash on 09/23/07 20:39
On Sep 23, 10:13 pm, zacar...@gmail.com wrote:
> ok, so youre saying that:
>
> <body style="height:100%">
> <div style="height:xpx">top</div>
> <div style="height:100%">middle</div>
> <div style="height:xpx">bottom</div>
> </body>
>
> is just not possible?
You should use absolute positioning, like this:
div { position:absolute; width:100%; }
#top { height:100px; }
#middle { height:100%; margin-top:100px; margin-bottom:100px; }
#bottom { height:100px; bottom:0; }
// Make it work in ie (bottom:0 doesn't work, javascript needed)
#bottom { margin-top: expression(document.body.clientHeight-100); }
Read more about absolute positioning here: <http://www.alistapart.com/
articles/conflictingabsolutepositions>
--Julian
[Back to original message]
|