Jump to content

How to remove unwanted grey section space after I resize an image for mobile view?

Recommended Posts


im hoping someone can help?

I can’t get rid of the grey space after resizing my main background image for mobile view. My site isn’t live yet and still trying to understand how this works.

I found a feed on here and have been trying this code but it doesn’t appear to work for me?

/* Mobile-Homepage-topbanner */
@media screen and (max-width:767px) {
section[data-section-id="5edddb08ea5e395a85788610"] {
    min-height: unset !important;
    height: 35vh !important;
    margin-top: 15vh;

attached image of my site in mobile view is the best I can do currently atm. 
this uses the resize code, also found on this forum, below.

@media screen and (max-width:640px) {
.homepage .section-background img {
    width: 100% !important;
    height: auto !important;

so I think it must be a combination of both somehow?

Any help would be greatly appreciated!!



Edited by Eagles
Forgot image!
Link to comment
  • Replies 5
  • Views 390
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi. Don't remove any code in your current code.

Add this to Design > Custom CSS

/* remove grey space on mobile */
@media screen and (max-width:767px) {
[data-section-id="6182a66412336b4fc5cf549e"] {
    min-height: unset !important;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.