Site logo

Archived topic

How to add css for single post with effect all different page?

7 replies · Started by Mr Calvert on November 11, 2020

Viewing posts 1–8 of 8

Hello this is my post: https://bongcuoi.com/test-bai-2/
I want

is padding top 60px and padding bottom 60px.
But when I add this css: #page.site.grid-container.container.hfeed{padding-top:60px;padding-bottom:60px;} that is useful but it effect all page different!
So I was try add with this code: .post-template-default#page.site.grid-container.container.hfeed{padding-top:60px;padding-bottom:60px;} but it no change anything. Can you help me fix that? It too near menu :(

Hi there,

try this CSS:

.single-post .site {
    padding-top: 60px;
    padding-bottom: 60px;
}

Yes that work! thanks you a lot of! How you can detect exactly that class? Can you guide for me :( I try fix theme generatepress a lot but very difficult to know exactly class!

The single-post is a Body Class.
If you right click and inspect your website and check the Elements Tab. Look for the <body> tag.
WordPress and GP adds classes specific to its needs.

The .site is the CSS class attached to the #page element

Yes thanks you so much ^^! All best with you!!! Do you have any blog or post talk about detect exactly that class? Can you give me for read? I really need that to CSS theme!

That is a lot of class I don't know how to choose right like you, but thanks you I will try research more!

No problem :)

This archived topic is closed to new replies.