Archived topic
Remove container padding for single posts
9 replies · Started by nickgray on September 22, 2020
Hello,
I have tried to remove container padding from the single posts, but the CSS is not applied for some reason.
I have added:
.single-post > .separate-containers .inside-article {
padding: 0 !important;
}
but this doesn't work for some reason.
It is not aligned with the logo like here https://nickgray.net/nyc-right-now/ and reseting it in Customizer makes 0 padding everywhere, so on iPad and Tablet it has 0 padding everywhere.
Hi Nicholas,
I see that you're using Autoptimize. Perhaps this is a caching issue.
Can you try clearing Autoptimize cache? (and browser cache just to be sure)
You may also want to add this CSS so the breadcrumbs is aligned to the logo too:
#breadcrumbs {
padding-left: 0;
}
Hi Elvin,
Cleared it and still the same. It doesn't react at all in customizer either (while I'm adding css)
If I set padding left to be 0 in Customizer, it just looks ugly with no space on the left for tablet and ipad. It also affects everything, e.g. blog page, category pages, search page
Breadcrumbs are not problem, I added that in custom css because I was unable to reduce padding for posts.
Can you test this CSS instead?
body.single .inside-article{
padding: 0px;
}
Let us know if it works for you.
That worked, thank you.
No problem.:)
I should've mentioned this earlier. My bad.
To add:
Alternatively, you can achieve the same result w/ GP Premium's Layout Element.
https://docs.generatepress.com/article/layout-element-overview/#content-1
You can set the Content Area to Contained (no padding) and set its display rule to apply only on single posts.