On Fri, Feb 29, 2008 at 08:52:27AM -0500, David Laakso wrote:
> Dave Sherohman wrote:
> >Both questions relate to my site at http://seethefnews.com/ and can be
> >seen on the page http://seethefnews.com/index.cgi?action=topwords
> >
> >1) Is there a way to get column sizing in pixels and percents to play
> >nice together? My base layout is set up with two columns in divs .main
> >and .nav, defined as:
> >
> >div.main { float: right; width: 84%; }
> >div.nav { float: left; width: 15%; margin-right: 5px; }
>
> With regard to only your first question, a negative margin layout using
> pixel width for the sidebar and percent for the content may do better
> for you. This one [1] has the same source order as yours-- content
> first, nav second...
>
> [1] <http://blog.html.it/layoutgala/LayoutGala31.html>
Thanks! Got it working with the style definitions changed to:
div.wrapper { float: left; width: 100%; }
div.main { margin-left: 140px; }
div.nav { float: left; width: 135px; margin-left: -100% }
and adding the "wrapper" div starting immediately before and ending
immediately after "main" in each of my templates.
Is there, by any chance, an annotated version of this (or a similar)
example available anywhere? Although it works, I prefer to know how and
why it works rather than cargo-culting existing code.
The main thing bothering me is that I have no idea why the wrapper is
necessary (beyond "it don't work if it ain't there"). It seems like
simply placing the "float: left; width: 100%;" on div.main (my
page)/div#content (the example) instead of using the wrapper should have
the same effect, but it doesn't.
--
News aggregation meets world domination. Can you see the fnews?
http://seethefnews.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/