Jump to content

How to set a different size for a google map on mobile SQSP7.1

Recommended Posts

Site URL: https://www.stelviopartners.com

I have placed a Google map in a footer with the right size, but in the mobile view the height shrinks so much that the map is useless. So I am searching for a solution to change the height only for mobile. I have implemented this personalized code from Tuan Phan,@tuanphan but unfortunately, it doesn't work:

@media screen and (max-width:640px) {
#yui_3_17_2_1_1622210185104_922 .image-inset {
    padding-bottom: 60% !important;
}
}

I have done quite some research but seems that not many have this same problem.  Any kind of hint would be greatly appreciated.

Cheers,🤩

Cris

 

 

Link to comment

Add to Design > Custom CSS > Save & reload the site

/* Mobile-Footer-map block */
@media screen and (max-width:767px) {
footer.sections .map-block>div {
    padding-bottom: 50% !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
  • 7 months later...
On 5/28/2021 at 8:01 AM, tuanphan said:

Add to Design > Custom CSS > Save & reload the site

/* Mobile-Footer-map block */
@media screen and (max-width:767px) {
footer.sections .map-block>div {
    padding-bottom: 50% !important;
}
}

 

 

@tuanphan

Can I ask why you use "max-width: 767px"?

I've seen it on many of your codes, and always curious as to the 767 as opposed to the 640.

Thanks!

P.S. This code worked for me, too, in another area than the footer. Just tweaked it a bit!

Link to comment
1 hour ago, Poppyseeds said:

 

@tuanphan

Can I ask why you use "max-width: 767px"?

I've seen it on many of your codes, and always curious as to the 767 as opposed to the 640.

Thanks!

P.S. This code worked for me, too, in another area than the footer. Just tweaked it a bit!

7.1. use max-width:767px for mobile

7.0 is 640px, it may be different, if you change the Breakpoint in Site Styles.

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.