...

View Full Version : layer problem



alaios
08-26-2002, 05:45 PM
I want to put a layer in my page
<div id="myDiv"
style="position:absolute; clip:rect(0px 1280px 15px 0px);; left: 124px; top: 208px; width: 390px; height: 13px; visibility: visible; overflow: visible">
</div>

The problem is that the explorer and the netscape shows the layer in different positions....what i must do?


aH!!do u know what is this?
<LINK REL="SHORTCUT ICON" HREF="Face01.ico">

beetle
08-26-2002, 06:35 PM
(0px 1280px 15px 0px);; <--

That 2nd semicolon may be causing problems

Oh and that <LINK> tag is for the favorite icon (appears next to link when added to favorites/bookmarked) See this page (http://www.webreference.com/js/tips/991126.html) for more info

alaios
08-26-2002, 07:25 PM
nop that is ok!!something else/

RoyW
08-26-2002, 07:45 PM
When I put that code in a blank document the layer appears at the same position in NS4 and IE5.

Are you sure it is the layer that is at the wrong position and not the fact that NS4 may use a different font size than IE so when there is content under the layer it appears to be in a different position?

adios
08-27-2002, 05:04 AM
Navigator ignores height set via CSS. The only way to get height (and other attributes) to render correctly is to use the HTML tags themselves; this is the way NS Layers were designed (the CSS was tacked on at the last minute):

<html>
<head>
<title>untitled</title>
</head>
<body>
<layer id="myDiv_NS" left="124" top="208" width="390" height="13"
clip="0,0,1280,15" bgcolor="blue" visibility="show">
</layer>
<nolayer>
<div id="myDiv"
style="position:absolute; clip:rect(0px 1280px 15px 0px); left: 124px; top: 208px; width: 390px; height: 13px; background:blue; visibility: visible; overflow: visible">
</div>
</nolayer>
</body>
</html>

Note how NS4 reads clip values: l,t,r,b instead of t,r,b,l - and that the bgcolor of an 'overclipped' side goes with it; very annoying.

See how nicely Layer HTML works:

<html>
<head>
<title>untitled</title>
</head>
<body bgcolor="black">
<layer left="0" top="80%" width="100%" height="20%" bgcolor="#880000"></layer>
<layer left="20%" top="60%" width="80%" height="20%" bgcolor="#aa0000"></layer>
<layer left="40%" top="40%" width="60%" height="20%" bgcolor="#bb0000"></layer>
<layer left="60%" top="20%" width="40%" height="20%" bgcolor="#cc0000"></layer>
<layer left="80%" top="0" width="20%" height="20%" bgcolor="#dd0000"></layer>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum