Dawn Theme - Change default Icon for Share button Product page

Solved

Dawn Theme - Change default Icon for Share button Product page

xnyjyh
Trailblazer
345 0 31

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
1270 329 391

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

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 9 (9)

BSSCommerce-B2B
Shopify Partner
1270 329 391

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.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

BSSCommerce-B2B
Shopify Partner
1270 329 391

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

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xnyjyh
Trailblazer
345 0 31

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
1270 329 391

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?

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xnyjyh
Trailblazer
345 0 31

share line.png

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

BSSCommerce-B2B
Shopify Partner
1270 329 391

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>

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xnyjyh
Trailblazer
345 0 31

Boo, i cant seem to get it 😞

BSSCommerce-B2B
Shopify Partner
1270 329 391

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

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xnyjyh
Trailblazer
345 0 31

Thank you! lol. Finally it works 🙂