Hi there!
I have added a custom liquid Google Maps to my Shopify homepage (Dawn Theme), and it looks good on desktop. The problem is that when I change the view to mobile, the Google Maps extends the screen width. How to fix this?
- In addition I just realized that for some reason my mobile preview shows the prices of the products (which I don’t want to be shown), is there a fix for this as well? I have disabled the prices and they don’t show up when I’m viewing the store from the “Customize” viewpoint.
https://9u9zwo5j56x853yr-76588974424.shopifypreview.com
My custom liquid currently for the Google Maps:
.
You can send me a direct message if you want to?
@webbuilder9 Hello,
Please Add This Code Go to the online store > edit code > assets > base.css
center iframe {
width: 96%;
}
Like This
Hello! This code makes the map look good on mobile, but now the map is way too wide for the desktop version. Is there a way to limit this code to apply to only to the mobile screen?
Hello! Thank you for the answer, but unfortunately I’m not that pro that I would understand where to post these codes without you telling me.
The 1st solution didn’t work as I tried to put it on my custom liquid. I also tried to put the price code to base.css, which didn’t work either.
Oh sorry I just realized that the Shopify Mobile Preview shows that the map would look fine on mobile, but actually when I click the https://9u9zwo5j56x853yr-76588974424.shopifypreview.com link on my mobile phone and open the webpage, the map still exceeds the width of the mobile screen same as in the beginning.
Still not working! Anyone can help me?