DHTML Lab - DHTML Diner - Element Page Coordinates, Part 2 | 5 | WebReference

DHTML Lab - DHTML Diner - Element Page Coordinates, Part 2 | 5


Determining Element Page Coordinates, Part 2
IE for Windows and TABLEs

<TABLE BORDER=x>

 

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

Notice that, although we have specified a border of 1 (one) it looks like the actual border rendered is 2 (two) pixels wide.

Move the blue square.



  

   
   
  
<TABLE CELLSPACING=0 CELLPADDING=0
       BORDERCOLOR=#3AF600 BORDER=1>
<TR><TD WIDTH=50>&nbsp;</TD><TD WIDTH=50>&nbsp;</TD>
    <TD>&nbsp;</TD></TR>
<TR>
    <TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD>
</TR>
<TR>
    <TD>&nbsp;</TD><TD>&nbsp;</TD>
    <TD><IMG ID="redbox" SRC="redbox.gif"
             WIDTH="200" HEIGHT="200"></TD>
</TR>
</TABLE>



Result

IE rendering

Our positioning is off by one pixel.

Why?

Is it because our BORDER attribute is set to 1?.

Before we answer these questions, let's try an example with nested tables.



Produced by Peter Belesis and

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

URL: https://www.webreference.com/dhtml/diner/realpos2/4.html


Justtechjobs.comFind a programming school near you






Online Campus Both