[Resolved] Modify Post Margin Height on Mobile

Home Forums Support Modify Post Margin Height on Mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1370790
    Andres

    Hello,

    I’m using the CSS below to set the left, right, and top margins on posts. On mobile, it’s setting the top margin to 80px.

    .single .container.grid-container {
        max-width: 950px;
        margin-top: 80px;
    }

    To set the top margin in mobile, would the following CSS work (X = px value)?

    @media (max-width: 768px) {
        .single .container.grid-container {
        margin-top: Xpx;
        }
    
    }

    Thank you very much, and have a good day.

    Cheers!

    Andrés

    #1370952
    David
    Staff
    Customer Support

    Hi there,

    that should work fine. Make sure the Mobile CSS comes after the desktop CSS.

    #1371060
    Andres

    Hi David,

    Thanks! Will do.

    Have a good day.

    Andrés

    #1371756
    David
    Staff
    Customer Support

    Glad we could be of help

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