Jump to content

Fallback image being stretch on mobile

Recommended Posts

It looks like you solved with this CSS?

@media screen and (max-width: 600px) {
    #collection-5fd25ba5faf0e33e98cef9f1 section:first-child {
        min-height:65vh !important;
        height: 65vh !important;
        width: 10% !important;
        min-width: 100% !important
    }

    #collection-5fd25ba5faf0e33e98cef9f1 section:first-child img {
        width: 80% !important;
        height: auto !important;
        background-repeat: no-repeat !important;
        background-size: contain !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

Unfortunately, that didn't completely solve it.

I could edit the vh area of the image  with this:

@media screen and (max-width:600px) {
#collection-5fd25ba5faf0e33e98cef9f1 section:first-child {
    min-height: 65vh !important;
    height: 65vh !important;
 	width: 10%!important;
  	min-width: 100%!important;
}

However none of those styles had a direct impact on the fall back image itself. That image still looks crushed on mobile 😞

I don' think this is doing anything.. 

  #collection-5fd25ba5faf0e33e98cef9f1 section:first-child img {
    width: auto!important;
    height: 100%!important;
    background-repeat: no-repeat!important;
    background-size: contain!important;
  }

 

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.