Site logo

[Resolved] H2 styling with additional image

Home Forums Support [Resolved] H2 styling with additional image

Home Forums Support H2 styling with additional image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1540467
    Colin

    I’d like to style my H2 with an image (a horizontal block under the H2 text). Is this possible? Any advice appreciated.

    #1540569
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I understand.

    Can you link me to the page in question or provide a quick example of what you are after?

    Let me know 🙂

    #1540774
    Colin

    Hi Leo,

    Thanks for getting back to me. Here’s an example:
    https://www.skillpacks.com/wp-content/uploads/2020/11/H2-styling.jpg

    Just a short blue line under my H2s, to give a little more visual appeal. (Presumably if there’s a way to do this in GeneratePress it could be any image, but that’s the look that I’m aiming for.)

    Any advice much appreciated (and a code snippet would be golden!).

    Thanks
    Colin.

    #1540929
    David
    Staff
    Customer Support

    Hi there,

    you can use some CSS like so:

    .entry-content h2:after {
        content: '';
        display: block;
        height: 5px;
        width: 80px;
        background-color: #f00; /* change color of line */
        margin-top: 5px;
    }
    #1541187
    Colin

    Brilliant! Thank you 🙂

    #1541189
    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.