Site logo

[Support request] How can I put Background color on my H1,H2, H3 Tags?

Home Forums Support [Support request] How can I put Background color on my H1,H2, H3 Tags?

Home Forums Support How can I put Background color on my H1,H2, H3 Tags?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1696842
    MD Tohidul

    Dear, I want to add color in the background of my H1, H2, h3 title. Can I do this with GeneratePress theme?

    Like this site: https://prnt.sc/10n118h

    #1697038
    David
    Staff
    Customer Support

    Hi there,

    you can either use CSS to globally style your headings eg.

    h2 {
      background-color: #0693e3;
      padding: 10px;
      color: #fff;
    }

    But this will apply to all of those elements which you may not want.

    If you want to selectively apply the colors then you can use the GenerateBlocks plugin, and use the Headline Block which provides padding and color controls.

    #2162518
    David

    Hi David

    How is this done for post pages only?

    Thanks

    #2162560
    David
    Staff
    Customer Support

    Hi there,

    you can add the single body class to the CSS like so to only apply it to posts:

    `.single h2 {
    background-color: #0693e3;
    padding: 10px;
    color: #fff;
    }’

    #2162603
    David

    Ah .single

    Awesome, thank you.

    #2162605
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.