Spartan
Spartan

Reputation: 215

Having trouble with aligning an iFrame in HTML5

Now I have made a website, and I have integrated google maps into it. Now I am havign trouble with centering Google maps on the web page.

Here is my code:

 <iframe width="640"
            height="480"
            align="middle"
            frameborder="0"
            scrolling="no"
            marginheight="0"
            marginwidth="100"
            margin-top:100px;
            margin-left:140px;
           src="https://maps.google.ca/?ie=UTF8&amp;t=h&amp;ll=49.894634,-97.119141&amp;spn=27.26845,56.25&amp;z=4&amp;output=embed"></iframe>

Upvotes: 3

Views: 7008

Answers (1)

sdla4ever
sdla4ever

Reputation: 128

Why not use margin:auto for the left and right of the iframe or the div its in.

Upvotes: 4

Related Questions