WordPress.org

Support

Support » Themes and Templates » Width of sidebar and content box

Width of sidebar and content box

  • Hi!
    I would like to have thinner sidebar and wider “main content box” at my blog. I would like to make changes not only at main page but also at pages with posts.
    Could you provide me with parts of code that have to be changed?

Viewing 1 replies (of 1 total)
  • Theme Author Sami Keijonen
    Member

    @samikeijonen

    For example like this in child theme style.css or in custom css plugin.

    @media only screen and (min-width: 49em) {
    
    #content {
    width: 68%;
    }
    
    #sidebar-primary, #sidebar-secondary {
    width: 28%;
    }
    
    }

    Or if you only want to target default, 2 or 3 columns layouts, something like this.

    @media only screen and (min-width: 49em) {
    
    .layout-2c-l #content, .layout-default #content, .layout-3c-l #content, .layout-3c-c #content {
    width: 68%;
    }
    
    .layout-2c-l #sidebar-primary, .layout-default #sidebar-primary, .layout-2c-l #sidebar-secondary, .layout-default #sidebar-secondary, .layout-3c-l #sidebar-primary, .layout-3c-l #sidebar-secondary, .layout-3c-c #sidebar-primary, .layout-3c-c #sidebar-secondary {
    width: 28%;
    }
    
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Width of sidebar and content box’ is closed to new replies.