On 1/17/06, Ricky Zhou <[EMAIL PROTECTED]> wrote: > > What's the best way to have a 2-column layout where the left div is > > fixed at 475px and the right div stretches to accommodate the viewport? > > Try setting width: 475px on the left column and use margin: 0 0 0 > 475px; for the right column.
That's the solution everyone, it's not hard, the left column has a fixed width and the right column has the default setting of width:auto to fill the remaining space and the margin to keep it from overlapping or float dropping. It would take a while to explain how this really works but it works just fine. I wish I could find an example but can't seem to find any other than this page, which describes another layout technique but just look at the underlying CSS of the page. http://www.positioniseverything.net/articles/jello.html And if you can, you should consider using ems for the width of the fixed column instead of pixels, if you can make it work with your design. -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
