Monday, August 19, 2013

Twitter Bootstrap CSS affecting Google Maps

I'm using Twitter Bootstrap, and have a Google map.
Images on the map, such as marker are being skewed by the CSS in Bootstrap.
In the Bootstrap CSS there is:


img {
    border: 0 none;
    height: auto;
    max-width: 100%;
}
 
Solution :
 
#mapCanvas img { //#mapCanvas is the div id of the Google Map
  max-width: none; 
}
 
Google Map : 

<div id="mapCanvas" style="width:600px;height:400px;"></div> 

No comments:

Post a Comment