Archived topic
Remove padding on pages / inside article?
5 replies · Started by victor on March 10, 2023
Hiya, wondering how to keep the padding on archive pages and such but remove padding on inside of the article (you click on a blog post and it displays).
#primary #main .post .inside-article {
margin-left: 0px;
margin-right: 0px;
}
But this seems to target archive page and inside article. Any ideas?
Hi Victor,
I believe the Content container option should help:
https://docs.generatepress.com/article/content-container/#contained
Let me know :)
I think it's suggesting to create a layout elements to apply for specific pages https://docs.generatepress.com/article/layout-element-overview/#content-1 Although I'd have to update each new page then I think? Sounds like a rabbit hole :(
Hi victor,
Your CSS is using margin, but inside-article does NOT have any margin attribute added by default.
So the CSS should not have any effect.
If what you want is to remove padding for all static pages as your topic title, then use a layout element, set the content container width to contain, and set the location to pages > all pages.
I currently have left and right padding added to the containers, although effects all containers.
I understand what you're saying and it sounds like a bit of work. Perhaps I'll keep as is for now, thank you!
No problem :)