In the video I have shown how you can integrate a responsive google map in web page.
Source code.
<style>
.google-maps {
position: relative;
padding-bottom: 75%; // This is the aspect ratio
height: 0;
overflow: hidden;
}
.google-maps iframe {
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
</style>
<div class="google-maps">
<iframe .... width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
Sample google map is shown below, Try reducing the page size of the window to see the responsive behavior of the MAP.
No comments:
Post a Comment