WordPress.org

Forums

Stargazer
Adjusting sidebar & content widths? (3 posts)

  1. mashedspuds
    Member
    Posted 11 months ago #

    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.

  2. .
    Member
    Posted 11 months ago #

    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%;
    }
  3. mashedspuds
    Member
    Posted 11 months ago #

    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.

Reply

You must log in to post.

About this Theme

About this Topic

Tags