I am having an issue. A friend of mine edited the base.css file, which resulted in creating a gap between the hero banner section and the rich text section. I am trying to adjust the height of the banner by increasing the pixels, but the more I increase the numbers, the bigger the gap becomes. The theme editor is, hence, controlling the height. I was really frustrated by numerous attempts to resolve the issue. I would be grateful if any of you could please suggest a solution to the issue. The store’s URL is: https://adistore.co.uk
/* Rich Text section: directly under Hero Banner */
#shopify-section-template--22934932193619__rich_text_ifGT7z {
margin-top: 0 !important;
padding-top: 4px !important; /* mobile top padding */
padding-bottom: 56px !important; /* keep bottom padding */
}
/* Desktop adjustments for Rich Text */
@media screen and (min-width: 750px) {
#shopify-section-template--22934932193619__rich_text_ifGT7z {
padding-top: 8px !important; /* slightly more top padding */
}
}
Section ID may change when you duplicate your theme and these selectors will no longer apply.
Use “Custom CSS” in the section settings and Shopify will scope your code to this section automatically.
You’re adding padding on the section itself, but this only increases the white gap. You should target the .rich-text element in this section instead.
So – remove the code above from the base.css and add this to the sections “Custom CSS” (shopify will scope it automatically, as I said above)
Thanks for your help. The problem is solved, but there appeared a gap between the hero banner section and rich text section. Any advice/help would be highly appreciated.
Thanks Tim. I placed the code in the Custom CSS in Rich Text Section. How long Shopify takes to recognise it.
Thanks once again for your help and time. Looking forward to get more help from you in the gap still stays.
Hi, I placed the code in base.css file but the gap still there on mobile. However, I have left a like with heart for your help and time. I would definitely appreciate it if you could please further guide me.
I’m having trouble with my store’s hero banner: • The mobile hero banner leaves extra blank space on mobile. • The Desktop hero banner image gets cropped in height • I’ve tried custom CSS but can’t fix these issues.
Regarding extra blank space on mobile, please turn off Stack text below image or Container option under Mobile layout of Image banner or Slideshow section.
Regarding hero banner image getting cropped, you can change Height settings of Image banner or Slideshow to Adapt to image