Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Image with text button issues ( Shopify Dawn Theme )

Solved

Image with text button issues ( Shopify Dawn Theme )

dreamtechzone_5
Shopify Partner
400 1 68

Hello Everyone!

I am using the Shopify Dawn theme. I have added image with text section to a product. I want the "Shop Now" button to scroll up when I click on it. I want to keep it like this in multiple products. Is it possible? Please help me. Thank you very much. 

 

Store: https://puppies-paws-shop.myshopify.com/products/dog-leash-1-2m-1-5m-2m-3m-strong-nylon-reflective-l...

Password: Admin

 

Screenshot 2024-10-26 214408.pngScreenshot 2024-10-26 214427.pngScreenshot 2024-10-26 214448.png

 

 

Reference website: https://bleame.com/products/crystal-hair-eraser#product-variants

Please click on Claim Offer.

 

Bleame-Crystal-Hair-Eraser-10-26-2024_09_49_PM.png

 

Accepted Solution (1)
Webstablish
Shopify Partner
71 12 15

This is an accepted solution.

Go to Online store -> Themes -> Three dots left of Customize -> Edit Code -> assets folder -> base.css and add the following at the bottom of the file

html {
  scroll-behavior: smooth;
} 

and save the file.

 

In the theme editor, select your button. Set the Button link to # (this will make it go to the top of the page, if you want to scroll to a specific element, edit sections/multirow.liquid and add an ID to the element you want to scroll to and set the Button link to #ID). Save the changes. Test your page.

 

Webstablish_0-1729973617131.png

 

MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time

View solution in original post

Replies 5 (5)

Webstablish
Shopify Partner
71 12 15

Hi @dreamtechzone_5, set the button link to the ID of the element you want to scroll to. In the Bleame example this is "#product-variants". To add a smooth scrolling effect, use CSS scroll-behavior: smooth; on the HTML element for example.

MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time
dreamtechzone_5
Shopify Partner
400 1 68

Thank you very much. It would be very helpful if you could tell me how to use the code. Please give me the code and where should I paste it.

Webstablish
Shopify Partner
71 12 15

This is an accepted solution.

Go to Online store -> Themes -> Three dots left of Customize -> Edit Code -> assets folder -> base.css and add the following at the bottom of the file

html {
  scroll-behavior: smooth;
} 

and save the file.

 

In the theme editor, select your button. Set the Button link to # (this will make it go to the top of the page, if you want to scroll to a specific element, edit sections/multirow.liquid and add an ID to the element you want to scroll to and set the Button link to #ID). Save the changes. Test your page.

 

Webstablish_0-1729973617131.png

 

MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time
dreamtechzone_5
Shopify Partner
400 1 68

Really you are Great. It worked. Thank you very much.

muke5hy
Shopify Partner
6 1 2

From admin section change the URL and add Id of the element to which you want to scroll, since I do not see fixed ID in your theme, you can add <URL>#MainContent in button. 

If this fixed your issue Likes and Accept as Solution is highly appreciated.
Get EXPERIENCED Shopify developers at affordable rates—visit mayvent.tech for quick quote!
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.