Re: Has Netscape problems with <div> position:relative???
by "Angie Michaels" <angiemichaels(at)blueyonder.co.uk>
|
Date: |
Sun, 25 Feb 2001 05:59:18 -0000 |
To: |
<hwg-languages(at)hwg.org> |
References: |
co |
|
todo: View
Thread,
Original
|
|
Netscape uses the <Layer> tag as opposed to IE using the DIV tag. seperate
browser compliant scripts have to be used after determining which browser
the client is using.
for Netscape :
if(document.layers) {document.write("<LAYER ID='lyr' top='15' left='170'
width='100' height='50' z-index='10' bgColor='silver'
visibility='visible'>Layer</LAYER>");
for IE :
if(document.all) {document.write("<DIV ID='lyr' STYLE='position:absolute;
top:15px; left:170px; width:100px; height:50px; z-index:10;
background-color:silver; visibility:visible'>Layer</DIV>");
The onmouseover HREF attribute would include a call to the function name ,
in this example 'mouseoverchange()'
function mouseoverchange() {
if(document.layers)
document.lyrname.width = 220 ;
document.lyrname.top = 530 ;
document.lyrname.left = 220; }
if(document.all)
lyrname.style.width = 220 ;
lyrname.style.top = 530 ;
lyrname.style.left = 220; }
}
I hope this is what you were asking :)
regards
Angie
----- Original Message -----
From: Heike Koester + Stefan Schulz <hksts(at)voyager.co.nz>
To: <hwg-languages(at)hwg.org>
Sent: Sunday, February 25, 2001 4:14 AM
Subject: Has Netscape problems with <div> position:relative???
> Hi fellow designers,
>
> I am pulling my hair out over the following problem:
> I would like to dynamically change a text contents of a <div> by
> mousovers. I've got it working fine in Explorer, but Netscape (4.07) is
> tricky:
> 1. If I use style="position:absolute; width:220px; top:530px;
> left:220px The text will be displayed one word per line
> 2. Using style="position:absolute; width:220px; top:1px; left:1px
> displays the textblock ok, but (of course not where I would like it to
> be positioned
> 3. Preferably I want to use style="position:relative; width:220px;
> top:0px; left:0px but NN isn't displaying the text at all.
>
> If you want to have a look at the URL:
> http://www.pws.co.nz/clients/raetihi/exp01.html (I will have version 3
> online!) (Please bear in mind, that the pages are in a VERY early stage
> and take quite some time to load because of pre loading about 20
> pictures....:-( )
>
> --
> Best regards
>
> Stefan Schulz
> Professional Web Solutions http://www.pws.co.nz
>
>
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA