Site logo

[Resolved] Custom width for posts, only posts

Home Forums Support [Resolved] Custom width for posts, only posts

Home Forums Support Custom width for posts, only posts

  • This topic has 3 replies, 2 voices, and was last updated 4 years ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2176247
    Mihail

    Hello, everyone!

    I want to change the width of the record content (only records)! To do this, I apply the following code:
    .single .site.grid-container {
    max-width: 800px;
    }

    This works, but there’s a problem. In this case the width also changes for products. And I need this width ONLY for posts.

    Please help me.

    https://i.ibb.co/FnhyPXz/2022-04-03-11-54-10.png
    https://i.ibb.co/Yhhhmd6/2022-04-03-11-54-31.png

    Here is a test site:
    http://lafarm.hostenko.net/v-ukra%d1%97ni-zyavivsya-pershij-nft-muzej-vijni/
    http://lafarm.hostenko.net/product/testovij-tovar/

    #2176256
    David
    Staff
    Customer Support

    Hi there,

    if you want to use the CSS then change it to:

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

    OR the alternative is to use a Layout Element to set the Content Width:

    https://docs.generatepress.com/article/layout-element-overview/

    You can set its Display Rules to Posts > All Posts.

    #2176257
    Mihail

    I solved the problem by creating a container with dynamic content (entry post) and making it the right width.
    https://i.ibb.co/WGcsdXt/2022-04-03-12-08-17.png

    #2176261
    David
    Staff
    Customer Support

    Glad to hear you found a solution you’re happy with.

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