Shopify themes, liquid, logos, and UX
Hi,
Can someone help me change the background color of my hero section to #eaeaea for mobile view only?
I don't want to change the aspect ratio to fill the white space. Additionally, changing the background color in the theme editor changes the bg-color on all pages, which I don't want either.
I need only this specific section to have this particular background color.
store link: https://www.nutravalid.com/
any help is greatly appreciated
Solved! Go to the solution
This is an accepted solution.
Go to your online store -> edit code -> theme.liquid file and paste this code in the end of file
{% if template == 'index' %}
<style>
@media only screen and (max-width: 768px) {
body {
background-color: #eaeaea !important;
}
}
</style>
{% endif %}
This is an accepted solution.
Replace the code with this
{% if template == 'index' %}
<style>
@media only screen and (max-width: 768px) {
body {
background-color: #eaeaea !important;
}
}
@media only screen and (min-width: 1024px) {
.m-button.m-button--link.m-button--large {
top: 65px !important;
}
}
</style>
{% endif %}
This is an accepted solution.
Go to your online store -> edit code -> theme.liquid file and paste this code in the end of file
{% if template == 'index' %}
<style>
@media only screen and (max-width: 768px) {
body {
background-color: #eaeaea !important;
}
}
</style>
{% endif %}
Amazing - Thank you so much..
Could you also look into the "Shop" button on desktop? If possible, could you help me move it slightly lower?
This is an accepted solution.
Replace the code with this
{% if template == 'index' %}
<style>
@media only screen and (max-width: 768px) {
body {
background-color: #eaeaea !important;
}
}
@media only screen and (min-width: 1024px) {
.m-button.m-button--link.m-button--large {
top: 65px !important;
}
}
</style>
{% endif %}
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