?
Solved

Finding the xy of a table cell

Posted on 2001-09-17
6
Medium Priority
?
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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

770 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