Hello,
Can someone please help me with a code to Place horizontal lines on either side of rich text title? Like in this pic:
Hello,
Can someone please help me with a code to Place horizontal lines on either side of rich text title? Like in this pic:
Hi @Goldy007
Can i try, would you mind to share your store URL? Thanks!
Hello @Goldy007
Add this css on your base.css or global.css file
.title-wrapper {
position: relative;
text-align: center;
}
.title-wrapper:before {
content: ‘’;
background: red;
left: 220px;
width: 20%;
height: 2px;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
}
.title-wrapper:after {
content: ‘’;
background: red;
right: 220px;
width: 20%;
height: 2px;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
}
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.
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, but this css are anyway working
Yes, u can if you have theme knowledge or little bit code knowledge
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
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!!!