[Resolved] Wrap H2 like this…

Home Forums Support Wrap H2 like this…

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1499181
    sanu kumar

    Hello
    Is it possible, can I wrap H2 like this: https://ibb.co/KVNL4pw
    H2 text should also be in the centre.

    #1499207
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can use the private information field.

    Let me know 🙂

    #1499245
    sanu kumar
    #1499367
    sanu kumar

    I didn’t get this, do I create Elements > Blocks and then add this two: h2-with-bg alignwide

    #1499550
    David
    Staff
    Customer Support

    What Elvin is proposing is you:

    1. Add the CSS he has provided.
    2. Edit the HTML for your heading in the Text editor – and write it like so:

    <h2 class="h2-with-bg alignwide">The h2 heading text</h2>

    Point 2 will be required for each H2 you want that style applied to.

    If you want to apply the style automatically to all H2’s in the single post content then you would need to do this:

    1. First remove any CSS you have already applied to your H2.
    2. Add this CSS:

    .single-post .entry-content h2 {
        padding: 10px 56px;
        background-color: blue;
        color: #fff;
        margin-left: -56px;
        margin-right: -56px;
    }
    
    @media(max-width: 768px) {
        .single-post .entry-content h2 {
            padding: 10px 20px;
            margin-left: -20px;
            margin-right: -20px;
        }
    }
    #1499643
    sanu kumar

    thanks David, it worked

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