Dawn Theme - Change default Icon for Share button Product page

Solved

Dawn Theme - Change default Icon for Share button Product page

xnyjyh
Trailblazer
390 0 45

I already know how to change the icon for the share button on the product page, but there's an issue... I space issue between the icon and share text. I can get a space between the icon and the text, but the underline starts right at the icon. I want "Icon *space* Share" See images below.

 

Green arrow shows unwanted underline:

share line.png

 

This default dawn theme share button:

share line 1.png

So how can I change to my icon and have the proper space/text between them?

 

 

Thanks

Accepted Solution (1)
BSSCommerce-B2B
Shopify Partner
1972 564 566

This is an accepted solution.

Hi @xnyjyh 

Step 1. Go to Admin -> Online store -> Theme > Edit code

 

1 (5).png

Step 2. Find the file theme.liquid. Add the following snippet before the </head> tag.

Untitled (10).png

 

<style>
.share-button__button {
    white-space: nowrap !important;
    overflow: hidden !important;
}
.share-button__button svg {
    margin-right: 10px;
}
</style>

 

The result

BSSCommerceB2B_1-1723429658448.png

If it helps you, please like and mark it as the solution.

Best Regards

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 10 (10)

BSSCommerce-B2B
Shopify Partner
1972 564 566

Hi Can you kindly share your store link (with the password, if any) with us? We will check it and suggest you a solution if possible.

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

BSSCommerce-B2B
Shopify Partner
1972 564 566

Hi @xnyjyh 

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file base.css. Search for the following CSS snippet

.share-button__button .icon-share {
    margin-right: 0.2rem !important;
}

If it helps you, please like and mark it as the solution.

Best Regards

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

xnyjyh
Trailblazer
390 0 45

Sorry, you might misunderstood the my question... I can change the spacing. its the underline after changing to my icon... please check my website again and put a space with my icons that's now active. you'll see the underline continuing after the icon. id like that space underline gone

BSSCommerce-B2B
Shopify Partner
1972 564 566

BSSCommerceB2B_0-1723427085795.png

You are increasing the space between the icon and the 'Share' text by adding spaces at the beginning of the text. However, this method is not ideal and, as you can see, it adds an underline to the spaces as well. Instead, to adjust the spacing between the icon and the text, you should use my approach: adjust the margin for the icon. Do you understand?

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

xnyjyh
Trailblazer
390 0 45

share line.png

when my icon is there, theres that underline when I use &nbsp; in share.liquid

BSSCommerce-B2B
Shopify Partner
1972 564 566

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file theme.liquid. Add the following snippet before the </head> tag.

<style>
.share-button__button {
    white-space: nowrap !important;
    overflow: hidden !important;
}
</style>

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

xnyjyh
Trailblazer
390 0 45

Boo, i cant seem to get it 😞

BSSCommerce-B2B
Shopify Partner
1972 564 566

This is an accepted solution.

Hi @xnyjyh 

Step 1. Go to Admin -> Online store -> Theme > Edit code

 

1 (5).png

Step 2. Find the file theme.liquid. Add the following snippet before the </head> tag.

Untitled (10).png

 

<style>
.share-button__button {
    white-space: nowrap !important;
    overflow: hidden !important;
}
.share-button__button svg {
    margin-right: 10px;
}
</style>

 

The result

BSSCommerceB2B_1-1723429658448.png

If it helps you, please like and mark it as the solution.

Best Regards

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

xnyjyh
Trailblazer
390 0 45

Thank you! lol. Finally it works 🙂

Tvisa
Visitor
1 0 0

How to change share icon ?

Tvisa_0-1740990192385.png

to this 

Tvisa_1-1740990225989.png