Re: Setting the left attribute of a <SPAN>

by "David Jones" <dvjones(at)ksbe.edu>

 Date:  Wed, 27 Feb 2002 10:42:48 -1000
 To:  hwg-techniques(at)hwg.org
 References:  server
  todo: View Thread, Original
I saw a browser sniffer script one time that assigned a 
variable a value of "layers" (for NS) or "div" (for IE), and 
used something like the Javascript line below to use the 
same function for each browser:

document.[variableName].datetime.left =100;

Sorry, no Javascript whiz, but IIRC, it worked fine.

David
dvjones(at)ksbe.edu

On 27 Feb 2002, at 19:49, u1067(at)plov.omega.bg wrote:

> There is no layer in IE - use div instead
> 
> Ivo
> 
> > The following code works fine with Netscape in terms of setting the
> > left attribute of a <span>. But does not work in IE.
> > 
> > document.layers.datetime.left =100;
> > document.layers.datetime.document.write(dispTime);
> > 
> > Right now I'm just trying to get a hardcoded value to work. But
> > ultimately I want it to change the coordinate based on the clients
> > screens size. 
> > 
> > Thanks for the help,
> > Melanie
> > 
> > 
> > Second Street Web Design
> > http://www.second-street.com
> > 
> > 
> > 
> 
> 
> 


 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.