Here is a control that will do most or all of what you want:: <div><a href="https://github.com/MinELenI/CBSviewer/blob/master/src/main/js/UpdateLegendControl.js">https://github.com/MinELenI/CBSviewer/blob/master/src/main/js/UpdateLegendControl.js</a><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/11/28 Sergeant_york <span dir="ltr"><<a href="mailto:electronicpanda@gmail.com" target="_blank">electronicpanda@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1- let's say you have a div for map (mapdiv in this case)<br>
<br>
<div id="mapDiv"></div><br>
<br>
2- you put another div inside of mapdiv<br>
<br>
<div id="mapDiv><div id="legendDiv"></div></div><br>
<br>
3- set legendDiv style<br>
<br>
#legendDiv{<br>
position: absolute;<br>
top: x;<br>
left: y;<br>
z-index: more than OpenLayers' viewPort<br>
}<br>
<br>
4- set an image inside of legendDiv<br>
<br>
<div id=map....><br>
<div id=legend..><br>
<yourPNG's url><br>
</div><br>
</div><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/legend-floating-over-map-tp5019001p5019375.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/legend-floating-over-map-tp5019001p5019375.html</a><br>

Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Disclaimer;<br>This message is just a reflection of what I thought at the time of sending. The message may contain information that is not intended for you or that you don't understand.<br>

</div>