WordPress.org

Support

Support » Themes and Templates » Adjusting sidebar & content widths?

Adjusting sidebar & content widths?

  • Hi.

    I’m in the process of adjusting both column widths (sidebar & content).

    I’m able to affect the sidebar with this:

    /* Adjust sidebar */
    #sidebar-primary {
        max-width: 100%;
        width: 10.27%;
    }

    But can’t seem to change the content:

    /* Adust main content */
    #content {
      max-width: 100%;
      width: 80.54%;
    }

    Linky to the site.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • .

    @techievous

    It’s a responsive theme; you need take @media queries into consideration as well, and being more specific would help overwriting the less specific codes:

    content width on desktop view

    @media all and (min-width: 950px) {
        .layout-2c-r #content {
            width: 80%;
        }
    }

    content width on other view (in this case, smaller than 950px in hte default code of the theme).

    #content {
        width: 90%;
    }

    The same with your sidebar. Be sure to take both small and large screens into consideration:

    @media all and (min-width: 950px) {
        .layout-2c-r #sidebar-primary {
            width: 18%;
        }
    }

    on other views

    #sidebar-primary {
        width: 90%;
    }

    Many thanks for taking the time to solve this!

    I’ve only used the following:

    @media all and (min-width: 950px) {
        .layout-2c-r #content {
            width: 75%;
        }
    }
    @media all and (min-width: 950px) {
        .layout-2c-r #sidebar-primary {
            width: 10%;
        }
    }

    And all seems ok.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adjusting sidebar & content widths?’ is closed to new replies.