[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Finding the xy of a table cell

Posted on 2001-09-17
6
Medium Priority
?
235 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 160 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

873 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