SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: TD left

  1. #1
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    TD left

    Hey all,

    Does a <TD> have a left property? Or something similar?

    Thanks

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Like align="left" ?
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    CSS, as in
    Code:
    td.classname
    {
       border: 1px black solid;
       left: 152px; /* <-- that */
    }
    I want to access it in JavaScript to line a DIV up directly under a table cell, regardless of where this cell is on the page. The way I have it now
    Code:
    left = menu.style.left;
    Doesn't work and when I try to insert the value into a text input to check that it is working, it returns nothing so I think that maybe there may be another method of retreiving this method. I posted it in CSS rather than JS forums because I'm not having problems with the JS but rather the CSS side of it.

    Thanks for the quick reply

  4. #4
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh, haha, sorry, forgot I was in the CSS forum

    So you want left to represent padding, or the axis placement?

    Sorry if I'm not getting you correctly
    Mike
    It's not who I am underneath, but what I do that defines me.

  5. #5
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Lol, I know for<DIV>'s anyway (not sure about others) that left is a CSS property. Eg,
    Code:
    <style>
    div.classname
    {
       top: 100px;
       left: 100px;
    }
    </style>
    <div class='classname'></div>
    That will create a layer 100 pixels down from the top of the document and 100 pixels accross from the left of the document.

    I want to get the number of pixels a specific table cell is from the left of the document using JavaScript so I can then place that value in a <DIV> layer so that it will correctly line up under the table cell.

    I think I covered it there


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •