Shopify themes, liquid, logos, and UX
Hi!
I am trying to add call-to-action buttons and when I do they have no background colour.
Can anyone spot the error or issue?
Custom CSV is
.button-container {
text-align: center; /* Centers the buttons horizontally */
margin-top: 20px; /* Optional: Adds some space above the buttons */
}
.btn {
padding: 10px 20px;
background-color: #f51d97; /* Pink background */
color: #fff; /* White text */
text-decoration: none;
border-radius: 5px;
display: inline-block;
margin: 10px 0; /* Adds some vertical space between buttons */
}
In Custom Liquid:
<div class="button-container">
<a class="btn" href="REMOVED">Click to email</a>
<a class="btn" href="REMOVED">Click to Call</a>
<a class="btn" href="REMOVED">Click to WhatsApp</a>
<a class="btn" href="REMOVED">Click to Send a Message</a>
</div>
Solved! Go to the solution
This is an accepted solution.
- Here is the solution for you @AdamR1983
- Please follow these steps:
- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.
<style>
.btn {
background-color: #f51d97 !important;
}
</style>
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
This is an accepted solution.
- Here is the solution for you @AdamR1983
- Please follow these steps:
- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.
<style>
.btn {
background-color: #f51d97 !important;
}
</style>
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
This is super helpful!
Now the background is pink but the text is not centered and black. Any idea?
<style>
.btn {
background-color: #f51d97 !important;
text-align: center !important;
color: #fff !important;
}
</style>
Can you try replace to this code @AdamR1983
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
ADD URL https://medicetics.com/pages/book-now
Semi working! The text is different and not centred with the below code
<style>
.btn {
background-color: #E5016E !important;
color: #fff !important;
text-align: center !important;
display: flex;
align-items: center;
justify-content: center;
height: 100%; /* Ensure the button has a defined height or is part of a layout that constrains its height */
}
</style>
<style>
.btn {
background-color: #f51d97 !important;
text-align: center !important;
color: #fff !important;
align-items: center !important;
justify-content: center !important;
}
</style>
Can you try this code @AdamR1983
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Sent a meeting request from the help today, but again thanks!!
Okay so it's not centred
<style>
.btn {
background-color: #E5016E !important;
color: #fff !important;
text-align: center !important;
display: flex;
align-items: center !important;
justify-content: center !important;
height: 100%;
font-weight: bold; /* Makes the text bold */
}
</style>
Can you share your store url?
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
<style>
.btn {
background-color: #f51d97 !important;
text-align: center !important;
color: #fff !important;
align-items: center !important;
justify-content: center !important;
padding: 0px 20px !important;
height: 40px !important;
line-height: 40px !important;
}
</style>
Can you try this code @AdamR1983
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Hello @AdamR1983
replace this css
.btn {
padding: 10px 20px;
background-color: #f51d97; /* Pink background */
color: #fff; /* White text */
text-decoration: none;
border-radius: 5px;
display: inline-block;
margin: 10px 0; /* Adds some vertical space between buttons */
}
And add this CSS:
.btn {
padding: 10px 20px;
background-color: #f51d97 !important; /* Pink background */
color: #fff !important; /* White text */
text-decoration: none;
border-radius: 5px;
display: inline-block;
margin: 10px 0; /* Adds some vertical space between buttons */
}
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024