Hi all!
I have two questions.
- I want to change the button position from top center to bottom center only on the mobile version (check photo attached). On desktop the button is exactly where it needs to be. It is only for that section, I am worried that other buttons might end up getting changed too.
- For both desktop and mobile, the opacity of the button is very light. I want to be able to actully see it too. is there a way to do that?
Here is the preview of my WIP website -
Preview
1 Like
Hi @amaya_world ,
Please use the following code in base/component-
@media only screen and (max-width: 749px) {
/* Replace with your section ID or class /
#shopify-section-featured-product .button {
position: relative; / or absolute/fixed, depending on the layout /
top: 20px; / Adjust these values as needed /
left: 10px;
/ Example: center it */
margin: 0 auto;
display: block;
}
}
Thanks
Thanks so much for this, I am a total newbe with coading, could you exlain to me what is ‘/* Replace with your section ID or class */’ and where can I find it? also is base/component- same as base.css? do I need to post it in the end of that file?
Hello @amaya_world
Go to online store ----> themes ----> actions ----> edit code ----> assets ----> section-image-banner.css
add this code at the end of the file and save.
@media screen and (max-width: 749px) {
.banner--small:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
min-height: 100rem !important;
}
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Hi Rahul! thanks so much for looking into my issue, the banner unfortunatey disappeared all together. What can I do about it? Also if there is a way to increase opacity, that would be amazing!
@amaya_world please add this css to the very end of your base.css file and check,
Shopify Admin → Online Store ->Theme → Edit code → base.css
@media screen and (max-width: 749px) {
#shopify-section-template--24777996697888__image_banner_YMRDMY .banner__content {min-height: 65rem !important;}
#shopify-section-template--24777996697888__image_banner_YMRDMY .banner__buttons .button{opacity: 1 !important;}
}
1 Like
This worked! Thanks a ton!