Archived topic
Mobile Padding CSS
9 replies · Started by Michelle on January 10, 2021
I utilized Customizer to adjust the padding between the header and content on mobile. I set the padding and the Container settings, layout>blog>archives, and so on. If I move my Customizer settings any further to reduce the padding that shows on the mobile, it messes up the settings on my blog page, archive pages, and category pages. It seems that no amount of adding or subtracting padding is helping.
Is there CSS that can reduce the padding ONLY FOR THE MOBILE header and the featured image?
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
My information is below
Would this be for every page or just a few specific page?
Yes, for every page on mobile.
Hi,
To clarify: You're trying to remove the space between the content and header highlighted in orange?
https://share.getcloudapp.com/04uNDjYy
If so, you can try adding this CSS:
@media(max-width:768px){
.separate-containers .site-main {
margin-top: 0;
}
}
I added the CSS and found that really, the only page that needs it is the Home page of the mobile site. My mistake.
You can try this CSS to make Elvin's CSS apply on the home page only:
@media(max-width:768px) {
body.home.separate-containers .site-main {
margin-top: 0;
}
}
Nice. Thanks.
No problem :)