• Resolved kbtremelling

    (@kbtremelling)


    I added padding to my website, but do not want the padding on the mobile version, because the lines are only 4-5 words in length and it looks a little funny. I can’t figure out the correct media query to my child theme that will make the content be 100% on the mobile page. Please help!
    https://www.thelittledietitian.com

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    Thank you for getting in touch with us.

    Please wrap all your css code with padding on Kale child theme with this clause:

    @media screen and (min-width: 768px) {
      //your code with padding here
    }
    

    I hope that helps.
    Thank you for your time in this.

    Best regards,
    Jarek
    Kale Support

    • This reply was modified 7 years, 11 months ago by jarektheme.
    • This reply was modified 7 years, 11 months ago by jarektheme.
    Thread Starter kbtremelling

    (@kbtremelling)

    I don’t want any padding on the mobile device. Should I put padding-right: 0px? Or is there something else that is more effective?

    I know you don’t need padding on mobile device. I’ve checked out your site and there are many css added to Kale child theme style.css file i.e.:

    .post-54 p {
        padding-left: 60px;
        padding-right: 60px;
    }
    .post-54 row.two-columns {
      height: 170px;
    }
    .page-id-5 p {
      padding-right: 80px;
      padding-left: 80px;
    }
    // and so on...
    

    In order to remove the padding on mobile devices you can replace the above code and wrap the declarations above with the media clause like this:

    @media screen and (min-width: 768px) {
    .post-54 p {
        padding-left: 60px;
        padding-right: 60px;
    }
    .page-id-5 p {
      padding-right: 80px;
      padding-left: 80px;
    }
    // and so on...
    }
    

    or leave it as it is now and add something like this:

    @media screen and (min-width: 768px) {
    .post-54 p {
        padding-left: 0;
        padding-right: 0;
    }
    .page-id-5 p {
      padding-right: 0;
      padding-left: 0;
    }
    // and so on...
    }
    

    I hope it is clear now ??

    Best.
    Jarek
    Kale Support

    • This reply was modified 7 years, 11 months ago by jarektheme.
    Thread Starter kbtremelling

    (@kbtremelling)

    Thank you very much. It looks great now!

    Theme Author lyrathemes

    (@lyrathemes)

    @kbtremelling Glad it worked out!! We’d love a review when you have a couple of spare minutes ??

    @kbtremelling Could you tell me the name of the slider you have used in your website (bottom)? It is really nice and I would like to have the in my blog too.

    Thread Starter kbtremelling

    (@kbtremelling)

    I’m not really sure what slider you are talking about. You mean my instagram feed? That is the AccessPress Instagram plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Media Query’ is closed to new replies.