You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Yixing Ma <yi...@interfacemgmt.net> on 2006/03/06 20:11:09 UTC

myfaces popup coodination (x,y) difference in IE and (Netscape,Mozilla, firefox)

What should I set to displayAtDistanceX and displayAtDistanceY? The location
of the popup in IE and (Netscape,Mozilla, firefox) is different.

Did anyone have the same problem?

 

Thanks for help,

Yixing Ma


Re: myfaces popup coodination (x,y) difference in IE and (Netscape,Mozilla, firefox)

Posted by Andrew Robinson <an...@gmail.com>.
If you want x & y css co-ordinates to be relative to your parent, the
parent must be a positional element, not an inline element. Typically
the HTML/BODY tag is the reference as it is the positional element. If
you set your parent "position:relative", then all top & left CSS
attributes of children will be relative to that parent since the
parent is no longer positioned "static" which is the default value.

Firefox & IE behave relatively the same way with this. This all
assumes the code for the popup is using CSS positioning

On 3/6/06, Lance Frohman <lf...@gmail.com> wrote:
>
> If your html element is nested inside another (<div>, <Iframe>, ...) the x,y
> will be reported
> differently between the different browsers. I think I.E. gives the absolute
> x,y and Netscape/
> Mozilla/Firefox is relative to the parent element, so you need to use
> javascript to add up
> successive parent offsets.
>
>  ________________________________
>  From: Yixing Ma [mailto:yixing.ma@interfacemgmt.net]
> Sent: Monday, March 06, 2006 11:11 AM
> To: MyFaces Discussion
> Subject: myfaces popup coodination (x,y) difference in IE and
> (Netscape,Mozilla, firefox)
>
>
>
>
>
> What should I set to displayAtDistanceX and displayAtDistanceY? The location
> of the popup in IE and (Netscape,Mozilla, firefox) is different.
>
> Did anyone have the same problem?
>
>
>
> Thanks for help,
>
> Yixing Ma

RE: myfaces popup coodination (x,y) difference in IE and (Netscape,Mozilla, firefox)

Posted by Lance Frohman <lf...@gmail.com>.
If your html element is nested inside another (<div>, <Iframe>, ...) the x,y
will be reported
differently between the different browsers. I think I.E. gives the absolute
x,y and Netscape/
Mozilla/Firefox is relative to the parent element, so you need to use
javascript to add up
successive parent offsets.

  _____  

From: Yixing Ma [mailto:yixing.ma@interfacemgmt.net] 
Sent: Monday, March 06, 2006 11:11 AM
To: MyFaces Discussion
Subject: myfaces popup coodination (x,y) difference in IE and
(Netscape,Mozilla, firefox)



What should I set to displayAtDistanceX and displayAtDistanceY? The location
of the popup in IE and (Netscape,Mozilla, firefox) is different.

Did anyone have the same problem?

 

Thanks for help,

Yixing Ma