Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have embedded a Google Map iframe in my theme and I'm trying to center a Google Map location in the middle of the map. All works fine except that my location is always shown to the upper left corner not the center

This is my website: http://tommelopp.no/kontakt/

The pop up is made using javascript to center it. Happy for all suggestions, tips or answers :)

share|improve this question

closed as off topic by toscho Oct 20 '12 at 8:48

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Off topic. Please ask google-maps Qs on SO. –  kaiser Jan 10 '12 at 15:01

2 Answers 2

I've used it like this and it works well ;-)

$(".div").html("<iframe width='850' height='450' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://yourlocation.com'></iframe>");  
$(".div").css("display","block");
share|improve this answer
up vote 0 down vote accepted

I googled some more and found out that the problem was that the <div> element containing the iframe was display:none; in my css.

My solution to this problem was to insert the iframe using jquery after i change the display type to block (also using jquery).

Hope this helps someone else. Sorry for posting this in the wrong place...

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.