|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
Great. Thanks!
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS not formatting when using .insertrow |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|