read1 Posted November 13, 2020 Share Posted November 13, 2020 Site URL: https://www.betterbasics.org/book-nook I used custom code to upload a google map to a webpage. How do I center the map? It is shifting to the left margin. Thank you, Beyondspace 1 Link to comment
Beyondspace Posted November 13, 2020 Share Posted November 13, 2020 2 minutes ago, read1 said: Site URL: https://www.betterbasics.org/book-nook I used custom code to upload a google map to a webpage. How do I center the map? It is shifting to the left margin. Thank you, Please add this to Design->Custom Css #block-yui_3_17_2_1_1604956736194_7123 iframe { margin: 0 auto; display: block; width: 100%; } tuanphan and IvanOB 2 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
IvanOB Posted March 24, 2021 Share Posted March 24, 2021 On 11/13/2020 at 3:58 PM, bangank36 said: Please add this to Design->Custom Css #block-yui_3_17_2_1_1604956736194_7123 iframe { margin: 0 auto; display: block; width: 100%; } bangank36 thank very much for this. I have searching for the css for this for 2 days and this works perfectly. Link to comment
IvanOB Posted March 24, 2021 Share Posted March 24, 2021 10 minutes ago, IvanOB said: bangank36 thank very much for this. I have searching for the css for this for 2 days and this works perfectly. Can i also check if there is a way to do this with one entry for all google maps rather than individually using their block ids? I can't work out the specific embed-block identifier to use. Beyondspace 1 Link to comment
Beyondspace Posted March 24, 2021 Share Posted March 24, 2021 1 hour ago, IvanOB said: Can i also check if there is a way to do this with one entry for all google maps rather than individually using their block ids? I can't work out the specific embed-block identifier to use. try .sqs-block-content iframe { margin: 0 auto; display: block; width: 100%; } and remove or resize space to col-1 IvanOB and tuanphan 2 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
IvanOB Posted March 26, 2021 Share Posted March 26, 2021 On 3/24/2021 at 11:51 PM, bangank36 said: try .sqs-block-content iframe { margin: 0 auto; display: block; width: 100%; } and remove or resize space to col-1 Thanks again bangank36, that works and i appreciate the fast reply Beyondspace 1 Link to comment
tuanphan Posted March 30, 2021 Share Posted March 30, 2021 @IvanOB Hi. I see same problem on Tablet. You can use this CSS for tablet /* center map */ @media screen and (max-width:991px) and (min-width:768px) { div#block-yui_3_17_2_1_1605281700671_15297+.row .span-10 { width: 100%; } div#block-yui_3_17_2_1_1604956736194_7123 { text-align: center; } } IvanOB 1 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
IvanOB Posted March 31, 2021 Share Posted March 31, 2021 On 3/30/2021 at 8:56 AM, tuanphan said: @IvanOB Hi. I see same problem on Tablet. You can use this CSS for tablet /* center map */ @media screen and (max-width:991px) and (min-width:768px) { div#block-yui_3_17_2_1_1605281700671_15297+.row .span-10 { width: 100%; } div#block-yui_3_17_2_1_1604956736194_7123 { text-align: center; } } Thanks @tuanphan I used @bangank36 code for the desktop and some tips from another youtube video to tailor the nobile view as below, which works fine so far in my testing. Just finishing off my first blog so will get a couple of friends to test out before publishing to make sure the page works on different devices /* center blog google embedded map */ .sqs-block-content iframe { margin: 0 auto; display: block; width: 100%; } /* make blog google map size smaller on mobile screen*/ @media only screen and (max-width: 767px) { .sqs-block-content iframe { margin: 0 auto; display: block; width: 80%; height: 50vh!important; } } Beyondspace and tuanphan 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment