Re: set div width to remaining width of the browser

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Do you need this?

<div style="float:left; width: 10em; border: solid 1px red">
ZZZZZ
</div>
<div style="margin-left: 10em; border: solid 1px green">
www
<div>


using float: left and float: right to build a two column page
layout.
<div style="float:left">column 1</div>
<div style="float:right">column 2</div>
then I set the width of the first column to a fixed size: <div
style="float:left; width:10em;>column 1</div>

how can I set the width of the 2nd column, the float:right div, to
fill the remaining space of its container?

I know I can use percentages, but I want the left column to always be
the same fixed length.

Is this a case where <table> is the obvious solution?

thanks,

-Steve



.



Relevant Pages

  • Re: fixed width, 2 column CSS layout problem
    ... > I trying to get the yellow sidebar to go in the white area to the right ... In this case the content div and the ... > instead they will overlap the bottom of their container. ... I know of several sites that use a similar layout and I've ...
    (comp.infosystems.www.authoring.stylesheets)
  • fixed width, 2 column CSS layout problem
    ... I trying to get the yellow sidebar to go in the white area to the right of the green content area and between the blue header and footer. ... In this case the content div and the side bar div will no longer stay in their container, the page div, instead they will overlap the bottom of their container. ... I know of several sites that use a similar layout and I've tried stripping them down to the bare bones layout, but each time I've tried I've screw it up. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Nested float that resizes container?
    ... I'm new to CSS and am trying to figure out how to have create the ... following layout that I could easily do with tables. ... I have a container that has some copy in it in a div and another div ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Position 2 DIVs on Single Line
    ... I want the content to have no fixed width but right side bar would be ... If no right side bar div tag shown, ... second column has a fixed width declared, but the first column, with no ... Removing DOCTYPE adds spacing in IE6. ...
    (alt.html)
  • Re: how to prevent unnecessary table resizing
    ... With neither quill nor qualm, ... > To clarify: ... > Since the containing div has width 100, the first column will have a line ...
    (alt.html)