Site logo

[Resolved] Change padding on posts but not mobile or pages

Home Forums Support [Resolved] Change padding on posts but not mobile or pages

Home Forums Support Change padding on posts but not mobile or pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1708120
    Deirdre

    Hi there,

    I’m having a bit of a brain fart and can’t figure out how to change the padding on posts but leave pages and mobile alone. If I change it through Customizer-Layout-Container then the set up I have on my pages goes crazy ( I only want to apply it to posts) and if I try CSS such as

    .single-post .entry-content { padding-left: 95px; padding-right: 95px; }

    .single-post .entry-header {
    padding-top: 20px;
    padding-left: 95px;
    padding-right: 95px; }
    }

    then it does what I want but affects mobile with too much padding. How can I change the padding just on desktop posts, not mobile or pages?

    #1708291
    Ying
    Staff
    Customer Support

    Hi Deirdre,

    You could give your CSS a media query so it only works on certain screen width, try this instead:

    @media (min-width: 769px) {
        .single-post .entry-content { 
            padding-left: 95px; 
            padding-right: 95px; 
        } 
        .single-post .entry-header {
            padding-top: 20px;
            padding-left: 95px;
            padding-right: 95px; 
        }
    }

    Let me know 🙂

    #1708342
    Deirdre

    Perfect, that sorted it, thanks so much!

    #1708405
    Ying
    Staff
    Customer Support

    You are welcome!

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