Shopify themes, liquid, logos, and UX
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:
This default dawn theme share button:
So how can I change to my icon and have the proper space/text between them?
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @xnyjyh
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;
}
.share-button__button svg {
margin-right: 10px;
}
</style>
The result
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
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
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
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
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
when my icon is there, theres that underline when I use in share.liquid
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
Boo, i cant seem to get it 😞
This is an accepted solution.
Hi @xnyjyh
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;
}
.share-button__button svg {
margin-right: 10px;
}
</style>
The result
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
Thank you! lol. Finally it works 🙂
How to change share icon ?
to this
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025