Adjusting embedded map
-
Hi,
I’m trying to make my map the same width as the ‘contact’ page. I’ve tried plugging in a css code but it has gone off the page.Can someone help me?
Thanks,
DavidThe blog I need help with is: (visible only to logged in users)
-
Hi there,
You can try and make your map responsive, so not only is the same width as the contact page, but it’ll also resize on different screen sizes.
You’ll need to add a div class before the iframe:
<div class="responsive-map"> <iframe src="https://www.google.com/maps/embed?.....></iframe> </div>Then add your custom CSS:
.responsive-map{ overflow:hidden; padding-bottom:56.25%; position:relative; height:0; } .responsive-map iframe{ left:0; top:0; height:100%; width:100%; position:absolute; }You can adjust the CSS depending your requirements.
I’ve tested and it worked on mine.
Let me know how that goes.
-
-
- The topic ‘Adjusting embedded map’ is closed to new replies.