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

    Join Date
    Aug 2003
    Posts
    14
    Rep Power
    0

    CSS not formatting when using .insertrow


    HELP! I have an CSS-formatted HTML table where I am adding rows with the javascript: .insertrow and .insertcell functions.

    The problem I'm having is that the CSS formatting is not used on the rows I add from the client side.

    Any suggestions?

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

    Join Date
    Feb 2003
    Posts
    8
    Rep Power
    0
    Hi,

    what I do when adding rows using insertRow is to apply the style after I have added the row,

    var tr = table.insertRow(0);
    tr.className = "myclass";

    or alternatively

    tr.style.fontFamily = "Arial";

    One thing to keep in mind is you probably want to add styles to the td element and not the tr.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    14
    Rep Power
    0
    Great. Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo