Solved

Finding the xy of a table cell

Posted on 2001-09-17
6
208 Views
Last Modified: 2010-04-09
How can I find the X,Y coord of a table cell?
I want this so I can place a layer underneath the cell.
0
Comment
Question by:calvinrsmith
  • 4
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6488231
As table cells are not directly positionable, they do not have a top
and left attribute.  You could put another element like a div in there
and style it with relative positioning.  that should then let you tet
the left and top attribute of the styles.

Cd&
0
 
LVL 1

Author Comment

by:calvinrsmith
ID: 6488261
nope doing this:
<div id=me style="position:relative;">

and this:
alert(me.style.left);

returns an empty alert box
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6488290
Now that I think of it, what I suggest can't work because it would
not be able to knows its postion because there is no positioning for
the cell which is its parent.  

I think the only possibility you have is to get the position of
table and calculate the position of the cell as an offset, but
the size of cells can be variable based on local settings, so it
does not look like it will be straight forward.

Cd&
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 40 total points
ID: 6694895
Not a pretty workaround, but as close as it gets, so that is the answer.

Cd&
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6716519
Comment from COBOLdinosaur accepted as answer.

Thank you
Computer101
Coommunity Support Moderator
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6717652
Thanks C101 :^)

Cd&
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Ajax control editor 4 63
Datepicker in PHP 9 38
PHP Undefined Index in HTML Form? 2 32
Need to click button twice to get results 2 34
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now