[OpenLayers-Users] 'Fluid' map in IE
chris Wild
chrismwild at gmail.com
Thu Apr 23 15:57:22 EDT 2009
Hi Martin,
Have similiar issues with IE6&7, IE8 ok tho.So have been keeping an eye out
for fixes.
This one may be a potential came up a while ago on user group. Haven't tried
it
upon the following fix which wraps the map div in another div and seems to
do the job...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>minOpenLayers.aspx</title>
<script type="text/javascript" src="script/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
map.zoomToMaxExtent();
}
</script>
<style type="text/css">
#map
{
background-color: Red;
position: absolute;
width: 100%;
height: 100%;
}
#mapWrapper {
position: absolute;
background-color: Blue;
top: 76px;
bottom: 0px;
left: 0px;
right: 0px;
}
</style>
</head>
<body onload="init()">
<div id="mapWrapper"><div id="map" class="smallmap"></div></div>
</body>
</html>
Regards
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090424/bb9cd31a/attachment.html
More information about the Users
mailing list