Site logo

[Resolved] Custom Right Sidebar width differently than the global setting.

Home Forums Support [Resolved] Custom Right Sidebar width differently than the global setting.

Home Forums Support Custom Right Sidebar width differently than the global setting.

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #1563658
    David
    Staff
    Customer Support

    Try this CSS:

    .right-sidebar.full-width-content #right-sidebar {
        max-width: 160px;
    }
    .right-sidebar.full-width-content .site-content .content-area {
        max-width: calc( 100% - 160px);
        width: unset;
    }
    #1564250
    Huseyin

    Nope the css code doesnt help

    Before
    https://ibb.co/1qL4q3N
    After:
    https://ibb.co/7jcqNX3

    #1564959
    Elvin
    Staff
    Customer Support

    Hi,

    To clarify: are you trying to achieve something like this?
    https://share.getcloudapp.com/2Nu0BX2D

    If so, we can modify David’s code a bit to achieve the same result.

    Try this:

    .right-sidebar.full-width-content #right-sidebar {
        max-width: 160px;
    }
    .right-sidebar.full-width-content .site-content .content-area {
        max-width: calc( 100% - 160px);
        width: 100%;
    }
    #1564964
    Huseyin

    Perfect!! Thanks, Elvin

    #1564969
    Elvin
    Staff
    Customer Support

    Glad it works for you. No problem. 🙂

    #1566486
    Huseyin

    Sorry i forgot how do I hide the Sidebar on tablet and phone devices ( (max-width: 979px) ) ? Where i want the content 100% width on tablet and phone devices.

    I grab codes from the thread (i attached it below) and play with it, but no luck.

    https://generatepress.com/forums/topic/hide-sidebar-on-tablet-mobile/

    #1566582
    Elvin
    Staff
    Customer Support

    You can use @media rule for that.

    Example:

    @media (max-width: 979px){
    .right-sidebar.full-width-content #right-sidebar {
        display:none;
    }
    }
    #1566658
    Huseyin

    thanks

    #1566665
    Elvin
    Staff
    Customer Support

    No problem. 🙂

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.