html – How to make a map of Google Maps responsive

Question:

How can I make responsive by embedding the map from google maps?

For example, this is the tagging line that google generates for you to insert into your html:

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d13566.89508901391!2d35.2354079!3d31.7780191!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xe33f01a44e2808aa!2sDome+of+the+Rock!5e0!3m2!1ses-419!2smx!4v1477799410016" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

In the CSS sheet, how can I make it responsive?

Answer:

Using css would be

iframe {
 max-width: 100%;
 height: auto;
}

Another option would be to add the iframe inside a div and using bootstrap assign the class row

<div class="row">
<iframe src="..." width="600" height="450" frameborder="0" style="border:0" allowfullscreen>
</iframe>
</div>
Scroll to Top