Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, I am so confused, after I added a code (code attached below) for hover effect on button, to "Assets/base.css" there is a red dot (pic attached) is that normal or should I remove the code? Everything was fine before that, The code seems to be working but I am just worried about the red dot appearing on the base.css. I am using dawn theme
button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}
Solved! Go to the solution
This is an accepted solution.
Can you delete code in file base.css and add this code to before tag </head> in file theme.liquid
<style>
button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}
</style>
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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowTry adding a } after line 3574
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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Add to here @Eliuk
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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowTo clarify media queries need their own closing brace, that added code either overwrote that, subsumed it, or it could have been missing the whole time and only now did the linter register the issue.
When adding new CSS, validate the CSS before and after
https://jigsaw.w3.org/css-validator
For any given CSS band-aid solutions try to use a custom-css setting before modifying files code directly.
This can avoid inadvertently breaking your theme or complicating future version upgrades
https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css
The custom-css setting does not need the surrounding opening and closing style tags: <style>...</style>
If you must modify files directly always make a back up duplicate of the theme first.
And learn how to rollback eligible files though asset files do not get this feature.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Thank you, It didn't help, So I just deleted the code.
Is there another way to go about this? I just want the button to change colour on hover.
This is an accepted solution.
Can you delete code in file base.css and add this code to before tag </head> in file theme.liquid
<style>
button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}
</style>
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)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowDone. Thank you so much!
Put the CSS in a custom-css setting in the theme visual designer per my response above
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
By 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, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024