How to reduce the width of banner images only on desktop?

https://empiricalwater.com/

I just need to reduce the width of the banner images at the top of my homepage. (Btw, with how much I’ve been posting here, I hope the site is actually getting better, lol.)

Anyhow, just need to make sure the sides of the images aren’t being cropped on desktop, I need it to shrink on desktop. Cheers and thanks for all the help.

Add this to your Custom CSS of banner section

@media (max-width: 767px) {
.banner__media img {
    object-fit: contain !important;
}
}

Thanks, but how do I eliminate the gray sections that show up on iPhone? I need the rest of the website to cover that space, if that makes sense

Also I just noticed I’m not actually seeing any change on desktop.

Sorry, I provided code for mobile. Please update code to this to make it changes for desktop only

@media (min-width: 768px) {
.banner__media img {
    object-fit: contain !important;
}
}

Is there a way to make the gray areas the same color as one of my backgrounds?

Hi @empiricalarby

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Like this?

Yes

I would like to see the background color be the same as the rest of my background: FDFCFB

Hi @empiricalarby

Please use this code.

.banner:after, .banner__media:after {
    background: #fdfcfb !important;
}