Archived topic
Marketer theme: How to reduce space between blog posts on archive page?
7 replies · Started by John on February 28, 2021
Hi, I'm trying to reduce the space between blog posts on my various archive/category pages, so that I can have more posts visible on the page. I was able to do it using Customizer > Layout > Container, but that changes the spacing for everything, including elements in the sidebar, which I don't want. See attached screenshot for the area I'm referring to. Thanks.
Hi there,
You can try adding this CSS:
article.post .inside-article, .site-content header.page-header {
padding: 0px 40px;
}
Thanks Elvin. That worked, except it also affected my About page, which has a full-width image, but now has left and right padding added. I only want to change the padding on my blog list (archive) pages.
Hi John
We could add a selector to target the blog page:
.blog article.post .inside-article, .blog .site-content header.page-header {
padding: 0px 40px;
}
Let me know :)
Hi Ying,
Unfortunately, that didn't work. When I targeted the blog page by adding .blog as indicated, it did fix the padding problem on the About page but it undid my padding settings on the blog page; they were no longer in effect.
Thanks,
John
We can try to exclude all the pages so it doesn't affect static pages like the About page.
Example:
body:not(.page) article.post .inside-article, .site-content header.page-header {
padding: 0px 40px;
}
Thanks Elvin, that worked.
Nice one. Glad it worked for you. No problem. :D