[Resolved] Container on mobile

Home Forums Support Container on mobile

  • This topic has 6 replies, 2 voices, and was last updated 5 months ago by David.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1471340
    Nicholas

    I need to reset container padding on mobile, but only on blog posts in order to have full width images inside those posts on mobile. When I reset the spacing in Customizer it resets spacing everywhere – on all pages – and everything gets messed up. Also, when I add padding left and right to all headings, paragraphs, ul, caption texts it is not applied. Is there simple way to make just images inside posts full width, without affecting pages?

    #1471513
    David
    Staff
    Customer Support

    Hi there,

    on the Single Post you want ALL images to span the full width of the Screen?
    If so can you share a link to your site and ill look at what CSS is required to do that.

    #1471970
    Nicholas

    Yes, all images inside posts should be full width on mobile phones, without any space on sides.

    #1471974
    Nicholas

    there are 300 posts, so CSS is necessary in order to have that layout on each of them.

    #1471995
    David
    Staff
    Customer Support

    Try this CSS:

    @media(max-width: 768px) {
        .entry-content img,
        .wp-caption img[class*=wp-image-] {
            margin-left: -20px;
            margin-right: -20px;
            max-width: 100vw;
        }
    }
    #1472063
    Nicholas

    It works, thank you!

    #1472464
    David
    Staff
    Customer Support
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.