I am currently working with bootstrap and have incorporated Google Maps API 3 into my project.
The issue I am facing is that the #map_canvas
element does not adjust responsively; it has a fixed width.
Additionally, when I try to use height: auto
and width: auto
, the map fails to display on the page.
Can someone please explain why this may be happening?
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
#map_canvas {
height: 400px;
width: auto;
}
</style>
<div class="container">
<div class="row">
<div class="span6">
<div id="map_canvas"></div>
</div>
</div>
</div>