[Resolved] Max-width in only certain pages

Home Forums Support [Resolved] Max-width in only certain pages

Home Forums Support Max-width in only certain pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #296545
    Iñigo García Aldazabal

    I know it’s not a query on the performance of GeneratePress, but there goes …
    The following code works perfectly on pages without sidebar:
    .no-sidebar .inside-article > * {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    }
    But I use WPSP to display the pages of the categories and, as it does not have a sidebar, it also affects them.
    The question is: Can this css be applied only to specific pages? Maybe with the page ID? Or do I forget the subject?

    #296546
    Leo
    Staff
    Customer Support

    Hi there,

    How are you entering the code currently?

    If you are using Simple CSS then you can enter them in the Simple CSS meta box of that page (unless it’s an index page)
    https://docs.generatepress.com/article/adding-css/#simple-css

    Otherwise you can try adding the .page-id-xx before .no-sidebar.

    Let me know if this helps.

    #296548
    Iñigo García Aldazabal

    I’ll try out Simple CSS. Adding .page-id-xx does not work. I do not know why

    #296549
    Iñigo García Aldazabal

    I forgot. Thank you.

    #296551
    Leo
    Staff
    Customer Support

    You’re welcome 🙂

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