Site logo

[Resolved] How to add a line after h2

Home Forums Support [Resolved] How to add a line after h2

Home Forums Support How to add a line after h2

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2411694
    Sabbir

    Hi,

    I want to add a line after h2 like this site: https://www.adventureinyou.com/

    how can I do this?

    #2411704
    Leo
    Staff
    Customer Support

    Hi there,

    1. Add liner CSS class to GB’s headline block:
    https://docs.generateblocks.com/article/headline-overview/#advanced

    2. Add this CSS:

    /*add and adjust the lines*/
    
    h2.liner:after {
    	content: '';
    	border-top: 6px solid;
    	margin: 0 20px 0 0;
    	flex: 1 0 20px;
    	color: #fcd900;
    }
    /*add spacing between heading and lines*/
    
    h2.liner:after {
    	margin: 0 0 0 20px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know if this helps 🙂

    #2412132
    Sabbir

    It’s not working.

    #2412178
    Sabbir

    This is working for me

    /*center the heading and lines*/
    
    h2.liner {
    	display: flex;
    	width: 100%;
    	justify-content: center;
    	align-items: center;
    	text-align: left;
    	text-transform: uppercase;
    	margin-top: 40px;
    }
    
    /*add and adjust the lines*/
    
    h2.liner:after {
    	content: '';
    	border-top: 6px solid;
    	margin: 0 20px 0 0;
    	flex: 1 0 20px;
    	color: #fcd900;
    }
    
    /*add spacing between heading and lines*/
    
    h2.liner:after {
    	margin: 0 0 0 20px;
    }
    
    #2412963
    Leo
    Staff
    Customer Support

    Glad to hear 🙂

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