PhotoJoe
07-19-2002, 03:47 AM
I have pages that are coded the same except for this little bit of code. Which comes from the page that works in IE
<!-- This works with NS and <span> tag works with IE
<div id="butterfly" style="position: absolute; top: 0; left: 0;">
<img name="pic" border="0" src="images/Other/monarch3_flap_md_clr.gif"
width="70" height="80">
</div>
-->
<span id="butterfly"><img name="pic" border="0"
src="images/Other/monarch3_flap_md_clr.gif"
style="position: absolute; top: 0; left: 0;" width="70" height="80"></span>
The following code comes from the NS page that works:
<div id="butterfly" style="position: absolute; top: 0; left: 0;">
<img name="pic" border="0" src="images/Other/monarch3_flap_md_clr.gif"
width="70" height="80">
</div>
<!-- // This code works for IE only have to use the above <div> tag for NS
<span id="butterfly"><img name="pic" border="0"
src="images/Other/monarch3_flap_md_clr.gif"
style="position: absolute; top: 0; left: 0;" width="70" height="80"></span>
<div align="left">
-->
So I guess I need a javascript funtion that will test for browser type and use the correct tag but I not quite sure how I get javascript to insert these lines of html code.
Link to the page that works with Internet Explore. (http://www.bottomlee.com/IEhome_10.htm)
Link to the page that works with Netscape. (http://www.bottomlee.com/NShome_10.htm)
thanks,
<!-- This works with NS and <span> tag works with IE
<div id="butterfly" style="position: absolute; top: 0; left: 0;">
<img name="pic" border="0" src="images/Other/monarch3_flap_md_clr.gif"
width="70" height="80">
</div>
-->
<span id="butterfly"><img name="pic" border="0"
src="images/Other/monarch3_flap_md_clr.gif"
style="position: absolute; top: 0; left: 0;" width="70" height="80"></span>
The following code comes from the NS page that works:
<div id="butterfly" style="position: absolute; top: 0; left: 0;">
<img name="pic" border="0" src="images/Other/monarch3_flap_md_clr.gif"
width="70" height="80">
</div>
<!-- // This code works for IE only have to use the above <div> tag for NS
<span id="butterfly"><img name="pic" border="0"
src="images/Other/monarch3_flap_md_clr.gif"
style="position: absolute; top: 0; left: 0;" width="70" height="80"></span>
<div align="left">
-->
So I guess I need a javascript funtion that will test for browser type and use the correct tag but I not quite sure how I get javascript to insert these lines of html code.
Link to the page that works with Internet Explore. (http://www.bottomlee.com/IEhome_10.htm)
Link to the page that works with Netscape. (http://www.bottomlee.com/NShome_10.htm)
thanks,