Archived topic
How to add a line after h2
4 replies · Started by Sabbir on November 11, 2022
Viewing posts 1–5 of 5
Hi,
I want to add a line after h2 like this site: https://www.adventureinyou.com/
how can I do this?
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 :)
It's not working.
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;
}
Glad to hear :)
This archived topic is closed to new replies.