fluid width content area (3 posts)

  1. zeaks
    Posted 5 years ago #

    I'm trying to allow my sidebar width to be adjusted, and have the content area auto adjust in relation to whatever the width of the sidebar is.
    EX: sidebar is 20% content would be 75%
    Sidebar is 25% content would auto adjust to 70%

    #primary {
        float: left;
        margin: 10px auto 0 0;
        width: 70%;
        padding-bottom: 30px;
    #content {
        margin: 10px auto 0 0;
        padding-left: 5px;
        width: 100%
    #main .widget-area {
        margin-top: 20px;
        float: right;
        overflow: hidden;

    Primary is the area where my content is, content is the post content.
    If I set the primary to auto, it just takes up the entire width of the page and shoves my sidebar to the bottom of the page.

  2. Triplanetary
    Posted 5 years ago #

    Try giving #primary a max-width rather than a width.

  3. zeaks
    Posted 5 years ago #

    Thanks, that didn't work though. if I set it to say 70%, it looks ok with a wide sidebar, but not with a narrow one, it won't increase/decrease in width depending on what width the sidebar is.

Topic Closed

This topic has been closed to new replies.

About this Topic