Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthoryanwhite
    • CommentTimeOct 30th 2008
     permalink
    I need to create a centered 2 column layout using a combination of fixed width AND percentage width (and also using min and max width for the body or container).

    The body/container min/max width will be 770 to 970 pixels wide.
    The right column is 360 pixels wide.
    The left column should be stretching to fit the remaining width.

    I searched around and found a couple of solutions, but none that approached satisfying all of the above needs.

    Can anyone help?
  1.  permalink
    Hi,

    Something like this will probably work:

    CSS
    #container {
    max-width: 970px;
    min-width: 770px;
    }

    #col2 {
    margin-left: 360px;
    }

    #col1 {
    float: left;
    width: 360px;
    }

    HTML
    <body>

    <div id="container">

    <div id="col1">

    </div>

    <div id="col2">

    </div>

    </div>

    </body>

    You'll need to play around a little to get IE on board.
Add your comments
    Username Password
  • Format comments as (Help)