Prev: Using styles to create frames?
Next: Forward scanning?
From: Jeff Thies on 24 May 2010 07:06 rf wrote: > "Jeff Thies" <jeff_thies(a)att.net> wrote in message > news:htclg4$7im$1(a)news.albasani.net... >> Ben C wrote: > >>> Don't you mean "position: absolute" on this one? >> Absolutely! > >>> It seems to me the natural and obvious way to do it. >> Except, I've run into trouble with the column_wrapper having no height. > > Of course it won't have any height. position: absolute removes the element > from the flow. As far as the layout of the rest of the content is concerned > (the wrapper div) it's as if that element did not exist. Make sure you put > nice big borders around all of your divs, so you can see where they are > going. Or use firebug to add the borders. > >> I had assumed that the child divs, even though they are absolutely >> positioned inside, would give it height. But they do not. > > Correct. For layout purposes they are no longer "child divs". They don't > "take up any space". > > And that's the problem with this. People get as far as you have and then > think "Let's give all those divs a specific height" and choose one that > looks good. For them. On their system. Then a viewer comes along with a > larger font size and ... well, think about it :-) > >> The usual tricks to trigger has layout don't work. > > Correct, although there are no "tricks" to make this work the way you expect > it to. And it's nothing to do with has layout. The wrapper div no longer has > any content, as far as its layout is concerned. > >> And a footer is now a topper! > > No, it's not. It's below the wrapper div, where it should be. Put a bit of > other content inside the wrapper div, but outside the column divs and you'll > see. > >> Either I'm doing something wrong or I need to rethink. > > Rethink. Do you have a better idea? I'm thinking this: <div id="wrapper_content_and_right_side" style="float: right; width: content+right_side_width"> <div id="content" style="float: left;width: some_width"> MAIN CONTENT </div> <div id="right_side" style="float: left;width: some_width"> RIGHT SIDEBAR CONTENT </div> </div> <div id="left_side_nav" style="float: left;some_width;"> </div> Or, is it as has been suggested: http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm Which has always looked a bit unholy to set up, to me. But only after reading very very carefully the chapters in the spec > on absolute, and relative, positioning. They don't do what you think they > do. It would be easier if Google could figure out what was content and what was navigation... Jeff > > > |