skip to Main Content

Good morning,

I would like to modify the CSS of my blog post pages, but if I do it, that change also the Woocommerce product pages description text, because both are identified as being "p".

p, ul, ol, pre, h1, h2, h3, h4, h5, h6, table, form {
    margin-bottom: 20
px
;
    line-height: 1.786em;
    font-size: 16px;
    color: #2f2b35;
}

Example of page where I like to change the text: https://librairiedamase.com/blog/quelle-bible-choisir/

Example of page where I like not to change the text (of description): https://librairiedamase.com/boutique/sainte-ecriture/bible-expliquee-et-commentaires/commentaire-des-psaumes-2/

Thank you in advance.

2

Answers


  1. Try adding this to your css

    #content > .entry > * {
        margin-bottom: 20px;
        line-height: 1.786em;
        font-size: 16px;
        color: #2f2b35;
    }
    
    Login or Signup to reply.
  2. You need to prepend a single post body class before your target tags.

    Example:

    body.single-post p {
      margin-bottom: 20px;
      line-height: 1.786em;
      font-size: 16px;
      color: #2f2b35;}
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search