Dawn 2.0 - Add padding to specific banner (not all)

Hi,

how can I add padding-right: 20% to a specific banner, and for mobile only?

It’s for the banner on the homepage.

Website: https://straight-narrow-drinks.myshopify.com/ (password zeropercent)

Thanks so much

@hannahdossary ,

Can you share the screenshot ?

of course


.

How it currently is

with padding-right: 20%

Put the CSS in base.css file

@media screen and (max-width: 749px)
#shopify-section-template--16176707829976__image_banner .banner:not(.banner--mobile-bottom):not(.email-signup-banner) .banner__box {
   max-width: 341px;
}
}

Hit Like and Accept as Solution

@hannahdossary ,

What’s your requirement ?

Try this in your css for mobile

#Banner-template--16176707829976__image_banner > div.banner__content.banner__content--middle-left.page-width > div {
    padding-right: 25%;
}

Note that this is based on the ID of your banner and will target it specifically. The CSS style might stop working in case of any changes to the banner.

@hannahdossary ,

@media screen and (max-width: 749px)
#shopify-section-template--16176707829976__image_banner .banner:not(.banner--mobile-bottom):not(.email-signup-banner) .banner__box {
   max-width: 341px;
}
}

Add this css at the bottom of Online Store->Theme->Edit code->Assets->base.scss.liquid

I put this within @media screen and (max-width: 749px){ }

but it doesnt seem to work

this doesnt seem to work

Same as @Shop_Lovers but doesnt work

@hannahdossary ,

Found it out. This code seems to work.

@media screen and (max-width: 749px){
#shopify-section-template--16176707829976__image_banner .banner .banner__box {
    padding-right: 20% !important;
}
}

Now i need to do the same to another page but i cant figure out which section # to use. anyone able to help so i can resolve this page?

the image at the top on this page: https://straight-narrow-drinks.myshopify.com/pages/offer