Jump to content

Embed code to enable integrated Google Map to size more mobile version

Recommended Posts

Site URL: https://cylinder-triceratops-8fh3.squarespace.com/

Hello! I have embedded a Google Maps 'My Map' onto one of my blog pages, on the embed code I have stated for it to be a specific size, mainly to make it bigger and fill up the page, which the default code didnt quite do.

However when I view the page in the mobile view, the embedded map is still the same size that I made it in desktop mode, is there a piece of embed code that can be used to make the map size down for mobile purposes. In addition I believe that the map is aligned to the left hand side, is there a tweak to the code or some additional code that can allow me to align to the centre? 

The first screenshot is the map as it is current in desktop mode, the second is it in mobile mode, where I am having the main issues and the third image is a screenshot of the embed code that was used to get what I have currently 

A.png

B.pngC.png

Edited by lewispickthall
Images and text were in confusing order
Link to comment
  • 4 weeks later...
On 1/14/2022 at 3:37 AM, lewispickthall said:

Hello taunphan sorry about the delay, the issue is still here! The site is now live so you should be able to see the issue

Where is map? I don't see it on homepage

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
12 hours ago, lewispickthall said:

Its on the About Me page @tuanphan

 

Add to Design > Custom CSS

/* Mobile About Me Resize map */
@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1639578210758_4592 iframe {
    width: 100% !important;
    height: 500px;
}
}

 

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
On 1/18/2022 at 3:42 AM, lewispickthall said:

@tuanphan thats worked! thank you very much! 

 

I am wanting to feature these embedded maps on future posts, do you have a 'one code fits all' that can be used for all future posts by any chance?

 

Thanks again

Try this new code

/* Mobile Resize map */
@media screen and (max-width:767px) {
iframe[src*="google.com/maps"] {
    width: 100% !important;
    height: 500px;
}
}

 

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
  • 1 year later...
On 6/3/2023 at 3:23 AM, freshlypressed said:

Hey @tuanphan I'm having a similar issue. I embedded my map, but I want to remove the grey header and make the map full width, can you help me?

image.thumb.png.d54991bafcb5d517f9dc3e13043276d6.png

This is my site: https://pentagon-tambourine-8346.squarespace.com/ (under compost processing)

PW: Catapult2023

Which page? I don't see it on home 

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.