Remove div padding for 2 specific pages on mobile

I’ll be adding this css code to these specific pages, unless you advise me to post in the main theme options css:
https://www.jaimemintun.com/start-here/
https://www.jaimemintun.com/about/

I wanted the page copy to be left-justified rather than centered in the browser, so I used padding to do it, but then it makes it squished on tablet and mobile with tons of white space to the right.

I love how it looks on larger screens, but want to remove the massive right-side padding for smaller screens. Not sure what the full css is to make that work.

Thanks!!

Hi there,

Please try to add a class to the text element where you set the large right padding. You can add a class to the text element by clicking on the customize option of the text element. Then add this code in the Global CSS:

@media (max-width: 767px) {
    .no-large-padding {
        padding-right: 0 !important;
    }
}

The code above assumes that the class you have added to the text element is no-large-padding .

If you could use the same class to the other text elements where you want the right padding removed on smaller screens.


You can find more info on how to check for CSS selectors here.
Then information about writing your custom CSS here.

Hope this helps.

Great, thank you!

You’re more than welcome, glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.