v6 api div sizing issues

This Page is locked
Modified: 2007/10/22 01:51 by ViaVE Visitor
Maps with a paritcular div sizing fine under the v5 api, but under v6 disappear. The way the div sizing is handled changed from v5 to v6.

If your map div has a percentage height and width in v5 but the body does not, it renders fine. In v6, the map just doesn't show up. The fix to get a full sized map is to use styles to set height and width to 100% in the <body> tag as well as the <div> that will contain the map. Note position:absolute is required in the body tag also.

WORKS IN V6 FOR FULLSIZE MAP
<body onload='OnPageLoad();' style='position:absolute; width:100%;height:100%;'>
  <div id="tikiMap" style='position: relative;width:100%;height:100%;background-color: #66CCFF'></div>
</body>


DOES NOT WORK IN V6 – no position absolute in body

<body onload='OnPageLoad();' style='width:100%;height:100%;'>
  <div id="tikiMap" style='position: relative;width:100%;height:100%;background-color: #66CCFF'></div>
</body>
DOES NOT WORK IN V6
<body onload='OnPageLoad();'>
  <div id="tikiMap" style='position: relative;width:100%;height:100%;background-color: #66CCFF'></div>
</body>