[Resolved] Sidebar width to 300px

Home Forums Support [Resolved] Sidebar width to 300px

Home Forums Support Sidebar width to 300px

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1268743
    Huseyin

    Hi Generatepress Team

    I know there are so many tickets for sidebars, tried all of them none of them helped me.

    So I need to have a sidebar of 300px in width, for adsense ad. Currently the container width is set at 1100px.

    #1268803
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media (min-width: 769px) {
        .right-sidebar .site-content {
            display: flex;
        }
        .right-sidebar #right-sidebar {
            width: 380px;
        }
        .right-sidebar #primary {
            flex: 1 0;
        }
    }

    note in the code width: 380px; its set to 380px as your Sidebar padding is set to 40px.

    #1269487
    Huseyin
    #1269519
    Leo
    Staff
    Customer Support

    I’m not seeing David’s CSS being added.

    How are you adding it?

    Are you using any caching plugins?

    #1269529
    Huseyin

    Solved it, just moved the CSS to the top and it worked

    #1269532
    Leo
    Staff
    Customer Support

    That means you have some CSS syntax errors which stop the code below the error from executing.

    #1269537
    Huseyin

    How could I solve the CSS syntax errors? please thankss

    #1269541
    Leo
    Staff
    Customer Support

    You can use a service like this to check:
    https://jigsaw.w3.org/css-validator/

    #1269554
    Huseyin

    legend, fixed few errors thank you, Leo

    #1269570
    Leo
    Staff
    Customer Support

    No problem 🙂

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