• Plans & Pricing
  • Log in
  • Get started
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress 
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Get started
  • Sign up
  • Log in
About
  • Plans & Pricing
Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress  
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Jetpack App
  • Learn more
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Search
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Forums / Baskerville 2: content/sidebar widths and spacing

Baskerville 2: content/sidebar widths and spacing

  • Unknown's avatar
    nilla2014 · Member · Jan 30, 2019 at 1:32 pm
    • Copy link Copy link
    • Add topic to favorites Add topic to favorites

    I’ve been playing around with the content/sidebar widths but can’t seem to get the CSS right. (I’ve removed all now and just left CSS to reduce images in sidebar: Awards)

    What I’m trying to achieve:
    1. widen content container width but reduce sidebar width in posts.
    2. reduce spacing between images in Awards section of sidebar in posts
    3. changes to work across all devices.

    Many thanks

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar
    elizazh · Member · Jan 31, 2019 at 10:29 am
    • Copy link Copy link

    Hi @nilla2014,

    For the width of the content area and the sidebar, please try this (might be working without the “!important” part) and you can adjust the numbers as you wish, as long as they both make up to 100%.

    body.single .content {
        width: 80% !important;
    }
    .sidebar {
        width: 20% !important;
    }

    For the margins in the awards section, please try this (again you could readjust the number, currently I put a 0 there)

    #text-4 img {
        margin: 0 auto !important;
    }

    Cheers,
    Eliza

  • Unknown's avatar
    nilla2014 · Member · Jan 31, 2019 at 1:51 pm
    • Copy link Copy link

    Hi @ elizazh, thank you for the CSS, which displays great for a desktop. Although, doesn’t work for mobile/tablet devices as it just cuts the display in half.

    Also, the #text-4 CSS spacing worked, but has done something strange to the thumbnails in ‘Today’s reader favourites’ for mobile/tablet display – a couple of the images don’t display, so I’ve removed the CSS.

    Thank you

  • Unknown's avatar
    elizazh · Member · Jan 31, 2019 at 3:55 pm
    • Copy link Copy link

    Yeah this code is for the desktop version. It’d be good to keep the current mobile and tablet version, which, from what I can see, uses 100% width for both content and aside section for max width of 1000px. So maybe you just need to add this code too:

    @media screen and (max-width: 1000px) {
    body.single .content {
        width: 100% !important;
    }
    .sidebar {
        width: 100% !important;
    }
    }

    Actually the margins look nice now, no? Have you done something different?

  • Unknown's avatar
    nilla2014 · Member · Feb 13, 2019 at 3:54 pm
    • Copy link Copy link

    Hi @elizazh

    Sorry for the delay in response – I had to see to my other self-hosted site I launched before Christmas.

    I’ve changed your CSS a little (also removed !important) to make more use of the content space whilst reducing the sidebar, which now displays correctly:

    /*container/sidebar*/
    body.single .content {
    width: 71%;
    }
    .sidebar {
    width: 26%;
    }

    And…


    @media
    screen and (max-width: 1000px) {
    body.single .content {
    width: 100%;
    }
    .sidebar {
    width: 100%;
    }
    }

    Many thanks for all your help! Have a wonderful day :)

  • Unknown's avatar
    elizazh · Member · Feb 18, 2019 at 10:51 am
    • Copy link Copy link

    Very glad you’ve figured it out!

    Cheers :)

  • The topic ‘Baskerville 2: content/sidebar widths and spacing’ is closed to new replies.

Tags

  • Baskerville 2
  • content/sidebar width
  • spacing

About this topic

  • In: CSS Customization
  • 2 participants
  • 5 replies
  • Last activity 7 years
  • Latest reply from nilla2014

Couldn't find what you needed?

Contact us

Contact us

Get answers from our AI assistant, with access to 24/7 expert human support on paid plans.

Browse our guides

Browse our guides

Find step-by-step solutions to common questions in our comprehensive guides.

WordPress.com

Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Professional Email
  • Website Design Services
  • WordPress Studio
  • Enterprise WordPress
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • WordPress.com Blog
  • Business Name Generator
  • Logo Maker
  • WordPress.com Reader
  • Accessibility
  • Remove Subscriptions
Help
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
  • Developer Resources
Company
  • About
  • Press
  • Terms of Service
  • Privacy Policy
  • Do Not Sell or Share My Personal Information
  • Privacy Notice for California Users
DeutschEspañolFrançaisBahasa IndonesiaItalianoNederlandsPortuguês do BrasilSvenskaTürkçeРусскийالعربيةעִבְרִית日本語한국어简体中文繁體中文English

Mobile Apps

  • Download on the App Store
  • Get it on Google Play

Social Media

  • WordPress.com on Facebook
  • WordPress.com on X (Twitter)
  • WordPress.com on Instagram
  • WordPress.com on YouTube

Automattic

Automattic
Work With Us
    • WordPress.com Forums
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions