How can I stack the image banner text and button over image on mobile only? Website discountotc.com
Topic summary
A user seeks help stacking image banner text and button over the image on mobile devices only for their Shopify store (discountotc.com).
Proposed Solution:
- Add CSS code to
base.cssfile via Online Store → Theme → Edit code → Assets - Use media query targeting max-width: 749px
- Apply CSS
orderproperty to.banner__contentand.banner__mediaelements
Current Status:
- Initial CSS solution provided did not work
- A second attempt was offered with
!importantflags added to the order properties - Discussion remains ongoing with no confirmed resolution yet
Note: The code snippets in the conversation appear corrupted/reversed, which may affect implementation.
Hello @EZ7
You can try this code: it will be helpful to you
Go to the Online Store->Theme->Edit code->Assets->base.css>Add this code at the bottom.
@media screen and (max-width: 749px){
.banner--mobile-bottom:not(.banner--stacked) .banner__content {
order: 1;
}
.banner__media {
order: 2;
}
}
That did not work, unfortunately. Is there other code you can recommend?
Hello @EZ7
You can try this code: it will be helpful to you
Go to the Online Store->Theme->Edit code->Assets->base.css>Add this code at the bottom.
@media screen and (max-width: 749px){
.banner--mobile-bottom:not(.banner--stacked) .banner__content {
order: 1 !important;
}
.banner__media {
order: 2 !important;
}
}
