What's your biggest current challenge? Have your say in Community Polls along the right column.

How to add a line on each side of a section title

Solved

How to add a line on each side of a section title

Katielabernathy
Excursionist
30 1 2

Hi! I'm very new to Shopify. I'd like to add a line on each side of my collection title on the home page of my website. I've attached an example. Can anyone help me with this?

 

Line.png

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
9118 2178 2688

This is an accepted solution.

Thanks for the info, try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before,
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
  content: '';
  width: 60px; 
  height: 2px; 
  background-color: pink; 
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before {
  left: 20%; 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
    right: 20%;
}
@media only screen and (max-width: 750px){
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before {
  left: 5%; 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
    right: 5%;
}
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1698875159019.png

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

View solution in original post

Replies 7 (7)

Made4uo-Ribe
Shopify Partner
9118 2178 2688

Hi @Katielabernathy 

Would you mind to share your Store URL website? with password if its unpublish. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.
Katielabernathy
Excursionist
30 1 2

Yes! the URL is shophelloindigo.com and the password is deirah

Made4uo-Ribe
Shopify Partner
9118 2178 2688

This is an accepted solution.

Thanks for the info, try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before,
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
  content: '';
  width: 60px; 
  height: 2px; 
  background-color: pink; 
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before {
  left: 20%; 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
    right: 20%;
}
@media only screen and (max-width: 750px){
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:before {
  left: 5%; 
}
h2.title.inline-richtext.h1.scroll-trigger.animate--slide-in:after {
    right: 5%;
}
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1698875159019.png

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.
Katielabernathy
Excursionist
30 1 2

Thank you so much! Is there a way to make the lines a little longer and change the color to a specific blue? Also, can you help me add these lines to the titles of each page? product page.png

Made4uo-Ribe
Shopify Partner
9118 2178 2688

I check your website, I think you change your password. Would you mind to share? Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.
Katielabernathy
Excursionist
30 1 2

Yes, it's Alston

Katielabernathy
Excursionist
30 1 2

Thank you so much! Is there a way to make the lines a little longer and change the color to a specific blue? Also, can you help me add these lines to the titles of each page? 

Katielabernathy_0-1698967932741.png