I would like the google map iframe to occupy 100% of the height, as of now it is only around 150px. The coding is as shown below, what should I do, please help me.
<iframe width="67%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.in/maps?f=q&
source=s_q&
hl=en&
geocode=&
q=Prabhakar.C,+ICON+Design+Studio,+sathy+road,+Ganapathy,+87-A,+First+floor,+muniappakoil+thottam,,+Coimbatore,+Tamil+Nadu&aq=1&sll=21.125498,81.914063&sspn=55.331887,107.138672&
ie=UTF8&
hq=Prabhakar.C,+ICON+Design+Studio,+sathy+road,+Ganapathy,+87-A,+First+floor,+muniappakoil+thottam,,&hnear=Coimbatore,+Tamil+Nadu&t=m&
ll=11.041457,76.983948&
spn=0.080872,0.109863&
z=13&iwloc=A&
output=embed">
</iframe>
100% height can only be achieved if the parent div's height is set. If the parent div has, for example, a height of 500px, a child div with a height of 100% would have a height of 500px.
Since the iframe's parent is body
(as long as it is the only element on the page) then you have to set the height of body
to 100%:
body {
height:100%;
}
But body has a parent element too—html
. So you have to set html
's height as well:
html, body {
height:100%;
}
Then your iframe:
<iframe height="100%" src="..."></iframe>
Should stretch to the window's height.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With