Tom
Tom

Reputation: 721

Google maps - override style

I am using the Google Maps api on my website and I have been experimenting with making a "fullscreen map" using a class toggle with jquery.

I am running into a problem in that the div which contains my google map appears to inherit some styles from the API which I am having trouble removing/overriding - does anyone know if I can do this?

From firebug, the Div is showing -

style="position: relative; background-color: rgb(229, 227, 223); z-index: 1;"

The CSS class I'm toggling to make it fullscreen is -

#map.fullscreen { position: fixed; width:100%; height: 100%; z-index: 60; left: 0; top: 0; }

Thanks for any help.

Upvotes: 1

Views: 2465

Answers (1)

MacMac
MacMac

Reputation: 35301

You could use jQuery to remove the style attribute:

$(function()
{
    $('#map.fullscreen').removeAttr('style');
});

Upvotes: 1

Related Questions