Shopify themes, liquid, logos, and UX
Hello,
Can someone please help me with a code to Place horizontal lines on either side of rich text title? Like in this pic:
Solved! Go to the solution
This is an accepted solution.
You mention richtext.
Check this one. If it not working you can pm me. For the URL.
@media only screen and (min-width: 749px){
h2.rich-text__heading.rte.inline-richtext {
position: relative;
}
h2.rich-text__heading.rte.inline-richtext:before,
h2.rich-text__heading.rte.inline-richtext:after {
content: '';
border-top: 3px solid red;
position: absolute;
top: 50%;
width: 25%;
transform: translateY(-50%);
opacity: 0.5;
border-radius: 20px;
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
h2.rich-text__heading.rte.inline-richtext:before {
left: 0;
}
h2.rich-text__heading.rte.inline-richtext:after {
right: 0;
}
}
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hi @Goldy007
Can i try, would you mind to share your store URL? Thanks!
I was hoping for a code so I can change colors, thickenss etc.., and add to other sections where I want it. Would that be possible?
Yes, u can if you have theme knowledge or little bit code knowledge
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
This is an accepted solution.
You mention richtext.
Check this one. If it not working you can pm me. For the URL.
@media only screen and (min-width: 749px){
h2.rich-text__heading.rte.inline-richtext {
position: relative;
}
h2.rich-text__heading.rte.inline-richtext:before,
h2.rich-text__heading.rte.inline-richtext:after {
content: '';
border-top: 3px solid red;
position: absolute;
top: 50%;
width: 25%;
transform: translateY(-50%);
opacity: 0.5;
border-radius: 20px;
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
h2.rich-text__heading.rte.inline-richtext:before {
left: 0;
}
h2.rich-text__heading.rte.inline-richtext:after {
right: 0;
}
}
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
This worked! Thank you so much!!!
Hello @Goldy007
Add this css on your base.css or global.css file
.title-wrapper {
position: relative;
text-align: center;
content: '';
background: red;
left: 220px;
width: 20%;
height: 2px;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
content: '';
background: red;
right: 220px;
width: 20%;
height: 2px;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
Thank you for trying- this code didn't work. I tried adding to the base.css, and also tried to insert it directly in the section in the custom CSS. In the custom css section this part >>>>> .title-wrapper , and .title-wrapper:before wasn't recognized. This is the section I'm trying to add it to. I'm using the latest Dawn theme.
Yes, but this css are anyway working
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
It is not working on .base or the custom css section. Any other ideas or codes I can try? Thx for helping!
can you share url
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025