DHTML Lab - DHTML Diner - Element Page Coordinates, Part 3 | 4 | WebReference

DHTML Lab - DHTML Diner - Element Page Coordinates, Part 3 | 4

Determining Element Page Coordinates, Part 3
NS6+, Mozilla and TABLEs



Let's try the same example, only this time our red-square-table has a BORDER value of 1.

Although we have specified a border of 1 (one) it looks like the actual border rendered is 2 (two) pixels. We discussed the reasons for this in Part 2.

Move the blue square.


<TR><TD WIDTH=50>&nbsp;</TD><TD WIDTH=50>&nbsp;</TD>
    <TD><IMG ID="redbox" SRC="redbox.gif"
             WIDTH="200" HEIGHT="200"></TD>


NS6 rendering

NS6.x browsers position the blue square correctly using our functions as they are.

So do Mozilla browsers up to version 0.9.6.

NS6 rendering

The positioning is off by one pixel in NS7, and Mozilla 0.9.7+

Let's try an example with nested tables.

Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Oct 16, 2002
Revised: Oct 16, 2002

URL: http://www.webreference.com/dhtml/diner/realpos3/4.html

Justtechjobs.comFind a programming school near you

Online Campus Both