Site logo

[Resolved] Full width images in all pages/posts on mobile

Home Forums Support [Resolved] Full width images in all pages/posts on mobile

Home Forums Support Full width images in all pages/posts on mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1835612
    Fai

    Hi guys,

    I’ve been looking through the forum but did not find a solution.

    I’m trying to make images on my pages and posts display from edge to edge on mobile.

    I’ve used the css code below. It worked for margin-left but not for margin-right.

    @media (max-width:768px){
    	 img {
    		margin-left: -10px;
    		margin-right: -10px;
    }

    Thanks!

    #1835614
    David
    Staff
    Customer Support

    Hi there,

    try this:

    @media (max-width:768px) {
        .entry-content img {
            margin-left: -10px;
            max-width: 100vw !important;
        }
    }

    I have added the entry-content class so it only affects images inside your post content.

    #1835623
    Fai

    worked perfectly. thank you for the quick response!

    #1835670
    David
    Staff
    Customer Support

    Glad to be of help

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