Archived topic
Adjusted title spacing on post affects homepage & archives
12 replies · Started by Dmitrii on December 18, 2021
The left padding I added to push the titles on my Posts is also affecting my homepage & archive pages.
How do I make it so that the padding only applies to post titles (and not the homepage or archive pages)?
Hi Dmitrii,
How did you set the left padding? Customizer option or CSS?
Let me know :)
Customizer option.
Is this the value you set in customizer:
[screenshot redacted as requested by user]
If so, change it to a normal value in customizer, then add this CSS so that the padding only applies to single post pages.
.separate-containers.single-post .inside-article {
padding: 95px 45px 0px 120px;
}
Please remove my site - I do not want it shared with the public via screencast.
And thank you - that worked.
It worked on desktop, but now my page looks very wrong on mobile and tablet. Reverting the change in the mean time.
Hi there,
You can make the custom CSS apply on desktop-only like this:
@media (min-width: 1024px) {
.separate-containers.single-post .inside-article {
padding: 95px 45px 0px 120px;
}
}
Let us know if that helps or not :)
That worked perfectly, thanks Tom!
Just for my own sake - is additional left padding the best way to create a "centered" style like this? https://www.weddingforward.com/lavender-wedding-colors/
Or is there a better way forward?
Thanks!
is additional left padding the best way to create a “centered” style like this?
No, the content should be centered by default if there's no sidebar activated on the page.
Got it - I have a side bar though (there will be ads there shortly).
Does that change anything?
Then the content + sidebar as the site container will be centered automatically.
I can't imagine only center the content with a sidebar activated, then the margin/space on the 2 sides would be different.
Thanks.
No problem :)