Tip of the Day: Google Maps styling

Tip of the day: If you are trying to embed Google Maps in a website, and things look horribly wrong, make sure that the following css style rule exists for your map div:

#whateveryourmapdiviscalled img {
   max-width: none;
}

Google maps makes really interesting abuse of width for it’s layout. I’ve got img max-width at 98% for the rest of the site so that images scale down correctly in the responsive design, but for google maps, that just causes chaos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s