Hello. I want to display these type of headings in my store
Thanks
A user wants to implement a decorative heading style in their Shopify store, specifically for a “SHOP THE LOOK” section with horizontal lines and dots on either side.
Solution Provided:
shop-the-look-heading containing an h2 element and span elements for decorative linesflex-grow on span elements::before and ::after pseudo-elements with absolute positioningImplementation:
The code should be added to the Shopify theme template file where the heading needs to appear. The solution uses standard HTML/CSS without requiring custom apps or plugins.
Hi @Old_money ,
You can place the following HTML code in your Shopify theme where you want the heading to appear (in template file)
## SHOP THE LOOK
CSS
.shop-the-look-heading {
display: flex;
align-items: center;
justify-content: center;
margin: 20px 0;
}
.shop-the-look-heading h2 {
font-family: 'Playfair Display', serif; /* Change this to Avenir Next or your desired font */
font-size: 36px;
font-weight: bold;
letter-spacing: 1px;
text-transform: uppercase;
padding: 0 20px;
margin: 0;
}
.shop-the-look-heading span {
flex-grow: 1;
height: 1px;
background-color: black;
margin: 0 10px;
position: relative;
}
.shop-the-look-heading span:before,
.shop-the-look-heading span:after {
content: '';
width: 6px;
height: 6px;
background-color: black;
position: absolute;
top: 50%;
transform: translateY(-50%);
border-radius: 50%;
}
.shop-the-look-heading span:before {
left: -10px;
}
.shop-the-look-heading span:after {
right: -10px;
}
I hope this helps! If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!
Regards,
Sweans