#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Buenos Aires, Argentina
    Posts
    74
    Rep Power
    12

    Changing the valign attribute of a cell via Javascript


    Hi!
    There is any way to change the valign (among others) attribute of a TD tag via javascript?

    In this case, I change the content of the TD dinamically and it depends on the content if I need the valign to be "middle" or "top"

    Thanks!

    Malinali
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Buenos Aires, Argentina
    Posts
    74
    Rep Power
    12
    This was an easy one

    document.getElementById(document.getElementById('myContentDiv').parentNode.id).vAlign = "top"

    In this case, I can't tell the id of the parent of the content, it could be anyone.
    The "attribute" properties doesn't seem to work in an XML approach... I need to put all this long ugly line to make it work... weird.

IMN logo majestic logo threadwatch logo seochat tools logo