Im trying to get google maps to show 100% width and height. I have search several examples but cannot get it to work. The page it here
http://o-meter.dk/geo2.html
I used this css in the head
<style type="text/css">
html, body { height:100%; }
</style>
and this in the map div inline
<div id="map" style="width:100%; height:100%;">indenfor</div>
The map dosnt show
If i do this instead
<div id="map" style="width:500px; height:500px;">indenfor</div>
then the maps shows in 500x500 pixels.
what am i doing wrong ?
I used the following css:
#map_canvas {
width:100%;
height:100%;
position: absolute;
top: 0px;
left: 0px;
}
The map needs both a height and a width.
<style type="text/css">
html, body { height:100%; width:100%;}
</style>
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