Hello!
I use the Craft theme and on my image banner for mobile, I would like to add a container so that people may read the text better. On the desktop version there is a “Show container on desktop” option but I’m not sure how to do it so when people look at the site on their mobile phones, it has the container also.
Photo of the website below so you can see.
The site is currently password protected.
www.shophouseofhunter.com
helloHOH is the password
Thank you!
@houseofhunter
Add this code at the bottom of Theme > Edit Code > assets > base.css file
@media screen and (max-width: 749px) {
.banner:not(.banner--mobile-bottom):not(.email-signup-banner) .banner__box {
background-color: rgb(var(--color-background)) !important;
}
}
let try it and let me know
2 Likes
It worked! But is there any way to make it smaller so that you can still see some of the photo?
@houseofhunter
Replace the previouse code by this
@media screen and (max-width: 749px) {
.banner:not(.banner--mobile-bottom):not(.email-signup-banner) .banner__box {
background-color: rgb(var(--color-background)) !important;
padding: 1rem !important;
}
}
2 Likes
Thank you! I was able to adjust the width and I think it looks good.
Thanks again for your help!
1 Like
@houseofhunter you are welcome
Hiya,
I used this code as well and it worked great but i was wondering if there was a way to make it even smaller, just so only the actual writing is in a container, not a whole block.
I have a attached a photo and drew a line around the section i want in a container, just so you can see more of the photo, i have tried different photos as well but they all get covered by the pink container bit.
Im new to Shopify so not sure if it is possible,
thank you