[Resolved] Apply custom css to Element layout

Home Forums Support [Resolved] Apply custom css to Element layout

Home Forums Support Apply custom css to Element layout

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #707186
    Ivan Cazorla

    Hi there, is it possible to apply some css to a element layout for, for example, make the max-width of the all the posts in the blog different than normal pages.

    thanks,
    Ivan

    #707188
    Leo
    Staff
    Customer Support

    Hi there,

    This is in the plan of Element.

    For now you can use CSS like:

    body.single .site.grid-container {
        max-width: 800px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #707196
    Ivan Cazorla

    thanks!

    #707197
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

    #707399
    Ivan Cazorla

    I just re-checked and that code affects to all pages, I needed it t affect only to the blog containter, that’s why I wanted to apply custom css to a element layout.

    let me know.

    #707434
    Leo
    Staff
    Customer Support

    No. The code will only apply to single posts – hence body.single.

    If you want to apply it to the main posts page, then this would be the selector:
    body.blog .site.grid-container

    #707945
    Ivan Cazorla

    Alright, it worked now. thanks!

    #708315
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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