Jump to content

Banner issues on mobile

Recommended Posts

I have been trying to resize my banner images for mobile and I'm having a difficult time.

 

I was able to get the mobile image loaded for the welcome page using the following css, but I can't hide the image I have loaded for desktop (see image).

/* CSS FOR TABLET AND MOBILE */
@mobile:  ~"only screen and (max-width: 640px)";

/* CSS FOR MOBILE */
@media @mobile {
#welcome-to-modern img {
  display: none;
}

#welcome-to-modern .sqs-block-image img {
  display: block;
}

#welcome-to-modern {
  background: url('https://images.squarespace-cdn.com/content/v1/633b8e53775c0c5c133adeee/67dc4734-6ed0-4ab7-b752-218d76f6878a/welcome+to+modern_square.jpg?format=2500w');
  background-repeat: no-repeat;
  background-size: 100%;
}

 

Thank you in advance for any help you can give!

image.jpeg

Link to comment

https://queencityshows.com/

You can use this code to Website > Website Tools > Custom CSS then save & reload the page to resize image on mobile

/* Mobile - homepage - top banner */
@media screen and (max-width:640px) {
body.homepage .Parallax-item:first-child img {
    width: 100% !important;
    height: auto !important;
    left: 0 !important;
    top: 70px !important;
}

section#welcome-to-modern {
    min-height: unset !important;
    height: 250px !important;
}}

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.