Site logo

Archived topic

Adding padding to images on mobile

3 replies · Started by John on June 17, 2020

Viewing posts 1–4 of 4

Hi there...

On mobile, I'd like to have just a little padding (right and left) for the images on this page.

My own CSS attempt isn't working.

@media(max-width: 768px) {
    	.wp-block-coblocks-gallery-masonry alignwide {
    	padding: 0 1em 0 1em;
	}
}

Thanks,

John

This worked.

@media(max-width: 768px) {
.coblocks-gallery {
list-style: none !important;
padding-left: 2em;
padding-right: 2em;
}
}

Thank you!

Glad you found a solution.
You're original attempt needed to be this:

@media(max-width: 768px) {
    .wp-block-coblocks-gallery-masonry {
        padding: 0 1em 0 1em;
        box-sizing: border-box;
    }
}

Thank you, David!

This archived topic is closed to new replies.