[thelist] can't find image position unless set with CSS?(was: javascript question (easy?) <-- not so easy)

AtdtXav atdtxav at yahoo.com
Thu Dec 13 12:22:27 CST 2001


Hmm...  So what you are saying, Mark, is that you cannot get the
position of an image or other element without having previously
set a location for that element with CSS?

I realize that CSS is what we're supposed to use for
positioning, but I would find it a major oversight if the only
reason a person can't identify the position of an image was
because they allowed it to be placed on the page in the manner
that HTML dictates (IE below anything previously scripted in
HTML).

--- Mark Howells <mark at mountain.ch> wrote:
> I think you'll find that the only way to get that information
> is by
> analysing the [element].top attribute in Javascript, which
> points to the CSS
> setting (or returns null if there is nothing set).
> 
> Regards
> Mark Howells
> Working in a Winter Wonderland
> http://www.mark.ac
> 
> 
> > Von: AtdtXav <atdtxav at yahoo.com>
> > Antworten an: thelist at lists.evolt.org
> > Datum: Thu, 13 Dec 2001 10:07:03 -0800 (PST)
> > An: thelist at lists.evolt.org
> > Betreff: Re: [thelist] javascript question (easy?) <-- not
> so easy
> > 
> > All I need is the actual, real position of an element, not a
> > position listed in a stylesheet.
> 
> 
> -- 
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com




More information about the thelist mailing list