[Resolved] Change container on full-width posts only

Home Forums Support [Resolved] Change container on full-width posts only

Home Forums Support Change container on full-width posts only

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #815186
    Tobias

    Hi,

    I’m searching for a way to change the container width on posts/pages without sidebars.

    As a result, full-width posts should be narrower and posts with sidebars should stay the same.

    Hopefully you can give me a hint.

    #815307
    David
    Staff
    Customer Support

    Hi there,

    some CSS like this:

    body:not(.right-sidebar) #main {
        max-width: 720px;
    }
    #815342
    Tobias

    Thank you very much, David. This works great!

    #815359
    David
    Staff
    Customer Support

    You’re welcome.

    #816389
    Will

    This is great. Is there any way to center the whole thing?

    #816394
    Tobias

    I centered it with

    margin-left: auto;
    margin-right: auto;
    

    Hope that helps.

    #816431
    Will

    Awesome. That did work. Thanks very much.

    In case anyone wants to see how I applied this, here’s a post with no sidebar and the revised width to 800px.

    #816445
    David
    Staff
    Customer Support

    Thanks Tobias – Will you can ignore the other topic reply 🙂

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