[Support request] Custom sidebar width

Home Forums Support [Support request] Custom sidebar width

Home Forums Support Custom sidebar width

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #823462
    Kristjan

    Hello,

    I am trying to optimize the container + content/sidebar widths for my site: https://searchtraffic.com/

    My problem is that a 30% sidebar width is too narrow, while 35% is too wide.

    What is the best way to change the sidebar width in smaller increments, such as 32% or 33%?

    Thanks,
    Kristjan

    #823501
    David
    Staff
    Customer Support

    Hi there,

    some CSS like this should do the trick:

    @media (min-width: 768px) {
        #primary {
            width: 68%;
        }
        #right-sidebar {
            width: 32%;
        }
    }
    #1272914
    Carson

    Is there a way to do this with PHP? I am using a two sidebar layout and with css it always looks kind of deformed. Would like sidebars to be 22.5% each and content 55%.

    #1273489
    David
    Staff
    Customer Support

    Hi there,

    the sidebar / main widths are defined using CSS – so PHP would only be parsing the CSS units.
    If you want to start a new topic where you can share your Site URL privately i can take a look at the issue.

    #1273639
    Carson

    It’s nothing live yet.

    @media (min-width: 768px) {
        #primary {
            width: 54%;
        }
        #right-sidebar {
            width: 23%;
        }
        #left-sidebar {
            width: 23%;
        }
    
    }

    Is this how you would do it?

    #1273996
    David
    Staff
    Customer Support

    Try this CSS:

    @media (min-width: 769px) {
    
        #left-sidebar,
        #right-sidebar {
            width: 22.5%;
        }
    
        #left-sidebar {
            left: -55%;
        }
    
        #primary {
            width: 55%;
            left: 22.5%;
        }
    }
    #1274054
    Carson

    Seems to work thank you very much!

    #1274974
    David
    Staff
    Customer Support

    You’re welcome

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