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

Home Forums Support [Resolved] How to add css for single post with effect all different page?

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1526914
    Mr Calvert

    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 πŸ™
    #1526937
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    .single-post .site {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    #1526966
    Mr Calvert

    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!

    #1527016
    David
    Staff
    Customer Support

    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

    #1527024
    Mr Calvert

    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!

    #1527092
    Leo
    Staff
    Customer Support
    #1527120
    Mr Calvert

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

    #1527269
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.