Google-Maps-for-Rails
Google-Maps-for-Rails copied to clipboard
How to make responsive map?
trafficstars
Solved, just put your map inside a div.
<div id="map-container">
<div id="map"></div>
</div>
Then add the following .css
<style type="text/css">
#map-container {
padding: 6px;
border-width: 1px;
border-style: solid;
border-color: #ccc #ccc #999 #ccc;
-webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
-moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
// width: 500px;
}
#map {
// width: 500px;
height: 500px;
}
</style>