On mobile, I’ve added the following code to my themes.liquid so that my main hero banner (Which has a transparent header) won’t touch the navigation bar.
Problem is, now it adjusted all my image banners, I just need it to take effect on the topmost hero banner. How can I keep the look of the hero banner but adjust the other image banners so that the texts are in the middle?
To ensure that the padding adjustment only affects the topmost hero banner and not all image banners, you need to target the specific section or class of the topmost hero banner in your CSS. Here’s an updated approach:
Updated CSS:
Add class=“hero-banner-top” to your topmost banner in the Liquid code. Example: