Site logo

[Resolved] Getting Icons To Align With The First Line Of A Headline Block

Home Forums Support [Resolved] Getting Icons To Align With The First Line Of A Headline Block

Home Forums Support Getting Icons To Align With The First Line Of A Headline Block

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2564669
    Jodie

    Hi, how can I ensure my icons are properly aligned with the first line of a headline block on GeneratePress? When I try to write content in a headline block that uses multiple lines, the icon aligns itself with the middle of the block, which I don’t want. Thanks for your help!

    #2564832
    David
    Staff
    Customer Support

    Hi there,

    it would require CSS:

    .floated-icon {
        display: block !important;
    }
    .floated-icon .gb-icon {
        float: left;
        position: relative;
        top: 5px;
    }

    And then add the floated-icon class to the headlines you want to apply it to.

    #2566961
    Jodie

    Hi David, thanks for that! Can I indent the entire content in the headline, so it matches up with the first line? I’ve attached a screenshot, so you can see what I mean.

    #2567124
    David
    Staff
    Customer Support

    If you just want the icon to be at the top instead of center.
    Then select the headline block with the icon, and in the Layout options set the align content to flex start ( the top align icon )

    #2568047
    Jodie

    Hi David, that’s great, thank you. I just want the icon in line with the first line of text of the headline block. Is that possible? Thanks so much for your help!

    #2568052
    Fernando
    Customer Support

    Hi Jodie,

    Can you try setting the Headline Block’s display to inline?

    Reference: https://docs.generateblocks.com/article/layout-options-overview/

    #2568063
    Jodie

    Hi Fernando, I tried that, but it doesn’t achieve the outcome I’d like it to. Any ideas on how to fix it? Thank you as always!

    #2568068
    Fernando
    Customer Support

    Keep it inline, then give it a class of turn-inline

    Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

    Then, add this CSS:

    .gb-headline.turn-inline span{
        display: inline;
    }
    #2568127
    Jodie

    Thanks very much Fernando

    #2568131
    Fernando
    Customer Support

    You’re welcome, Jodie!

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