Interesting. I tried to add the following CSS rule to my code:

* {
        padding: 0px;
        margin: 0px;

The position of the inputs changed. However, input #1 is rendered a
little bit below input #2 (even before I call clonePosition).
Inspecting span #1 with Firebug, I can see 1px of "offset" on the top,
which doesn't happen with span #2. Is this an attribute I have control
over using CSS? After clonePosition, input #1 remains a bit below
input #2 (although this is almost unnoticeable when the page is not
zoomed in).

Then I tried adding a font-size declaration to the CSS rule:

* {
        padding: 0px;
        margin: 0px;
        font-size: 12px;

For some reason, the components look properly aligned before calling
clonePosition (even though Firebug still indicates that "offset"
pixel). However, when I call clonePosition, the same alignment problem
shows up.


On Sep 8, 8:32 am, david <> wrote:
> Hi Tiago,
> The browser itself have a specific rendering option, to be sure that
> everything is identical use a RESET.CSS file that supress all margin /
> padding from all elements. That could be reason of your trouble.
> Other though will writing, does font-size is the same in both element
> SPAN & DIV ?
> --
> david
> On 7 sep, 15:09, ColinFine <> wrote:
> > On Sep 5, 1:38 am, Tiago <> wrote:> ColinFine,
> > > I couldn't find anything relevant in the spec either. However, my
> > > point is not whether or not the elements are being positioned
> > > identically. It's whether the position reported by the browser is in
> > > fact the rendered position. As far as I understand, it's this apparent
> > > incoherence that causes clonePosition to behave improperly.
> > My point was that it is possible that even though an inline element
> > and a block element appear to be at the same position, it might be
> > that their actual position values will not agree, because of the
> > different positioning models. I don't know if this could occur or not.
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to