[Resolved] How do you adjust content width manually if you use a sidebar?

Home Forums Support [Resolved] How do you adjust content width manually if you use a sidebar?

Home Forums Support How do you adjust content width manually if you use a sidebar?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #936809
    sportsfan74

    Hi Support

    How do you adjust content width manually if you use a sidebar?

    #937081
    David
    Staff
    Customer Support

    Hi there,

    the Layout Elements > Content width control applies to all the content so would effect the width of the content and the sidebar combined.

    What are you trying to achieve? A reduced content width without effecting the sidebar?

    #937457
    sportsfan74

    The problem I am having is that the sidebar width only adjusts in increments of 5%, so if I wanted 27% for the sidebar width, how will I achieve that please?

    #937460
    David
    Staff
    Customer Support

    You would need some CSS like this for the right sidebar adjustment:

    @media(min-width: 769px) {
        #primary {
            width: 73% !important;
        }
    
        #right-sidebar {
            width: 27% !important;
        }
    }
    #937633
    sportsfan74

    thanks David that is excellent, exactly what I was looking for, another thing could you please tell me what does “! important” mean in the CSS code that you provided above?

    #937738
    David
    Staff
    Customer Support

    So the sidebars and content already have CSS properties to set their widths. The !important is a way of making our CSS more important to override it. In this instance its probably not required as an #ID selector would have more specificity ( importance ) then the themes CSS.

    #937745
    sportsfan74

    thanks for that super info and one more thing does this “!important” property if used, does it effect pagespeed or SEO score?

    #937767
    David
    Staff
    Customer Support

    Nope – doesn’t make any impact on SEO/Performance – i generally try to limit the use of !important but, unlike this case, its not always possible.

    #937788
    sportsfan74

    thanks David that’s awesome to know! 🙂

    #938106
    David
    Staff
    Customer Support

    You’re welcome

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.