WordPress.org

Ready to get started?Download WordPress

Forums

Path
Width of sidebar and content box (2 posts)

  1. Endrju88
    Member
    Posted 1 year ago #

    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?

  2. Sami Keijonen
    Member
    Theme Author

    Posted 1 year ago #

    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%;
    }
    
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags