Site logo

[Support request] changing post margins without effecting page margins

Home Forums Support [Support request] changing post margins without effecting page margins

Home Forums Support changing post margins without effecting page margins

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1857503
    Streater

    How do I change the margins just for posts?

    I tried these options below:

    
    @media (max-width: 769px) {
    .entry-content:not(:first-child) {
        margin-top: 10px;
        margin-left: 20px;
        margin-right: 20px;
        padding: 0px;
    }
    }
    AND
    @media (max-width: 769px) {
    .inside-article{
        margin-top: 10px;
        margin-left: 20px;
        margin-right: 20px;
        padding: 0px;
    }
    }
    

    YES these do change the margins for pages BUT they also change it for all my pages. I have different margins settings for my pages (I set the default margins to 0px and control the spacing in each div with a universal class)… and these solutions above ADD extra spacing on the side for all my pages which is a huge problem.

    Any ideas?

    #1857574
    Elvin
    Staff
    Customer Support

    Hi there,

    We can add single post page selector to the CSS so it only applies to the single post pages.

    Example:

    @media (max-width: 769px) {
    body.single .inside-article{
        margin-top: 10px;
        margin-left: 20px;
        margin-right: 20px;
        padding: 0px;
    }
    }
    #1857960
    Streater

    Perfect! Thank you!

    #1860494
    Elvin
    Staff
    Customer Support

    Nice one. No problem. 😀

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