Shopify themes, liquid, logos, and UX
I was wanting to add buttons to my product descriptions and I found this old thread (link below) which provided the html to do so. I want to have 3 buttons at the top of the product description (but below the 'add to cart' button) and i'm not sure what changes to the html i would need to do to be able to specify different colours for each one? Currently they are all the same colour -----
I used the html provided by May in this old thread: https://community.shopify.com/c/shopify-design/how-to-create-a-custom-link-call-to-action-button/td-...
This is the HTML example from the thread that I used to create the buttons.
Does anyone know what I need to change to be able to have different colours for each of the 3 buttons?
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi @PaperMinx
You can add an inline style to each button example like this to add different color buttons.
<a class="button" style="background-clor: #red;"...>your button name</a>
- Helpful? Like and Accept a solution. - Donate: Buy coffee ☕- or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now
You need to target each individual button with CSS selectors. Can you provide the link to your store?
Or use inline styles like Dan suggested 😄
Freelance Shopify Developer | Helping Shopify merchants grow with high-converting online stores!
- Did I help? Leave a tip!
- Need my help? Chat on Telegram or WhatsApp
- Was your question answered? Mark it as an Accepted Solution ✅
Thank you. I'll try the inline styles first and if I can't work that out i'll let you know the link and look into CSS selectors.
This is an accepted solution.
Hi @PaperMinx
You can add an inline style to each button example like this to add different color buttons.
<a class="button" style="background-clor: #red;"...>your button name</a>
- Helpful? Like and Accept a solution. - Donate: Buy coffee ☕- or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now
Thank you! I'll give that a try. Do i then remove the colour part of the style coding that I currently have at the bottom of the description. This part...
<style><!--
.button {
background-color: #f0bfaf;
color: #ffffff;
font-size: 14px;
padding: 5px 14px;
text-align: center;
display: inline-block;
text-decoration: none;
font-weight:bold;
}
.button:hover {
background: #f0bfaf;
color: #fff;
}
--></style>
Style inline will override the color in that code so you can remove it or not.
- Helpful? Like and Accept a solution. - Donate: Buy coffee ☕- or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now
Oh fantastic, I just tried it and it worked! Thanks so much.
Happy I could help!
- Helpful? Like and Accept a solution. - Donate: Buy coffee ☕- or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now
User | RANK |
---|---|
193 | |
177 | |
84 | |
58 | |
45 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023