Hi ckosloff,
So, basically my question is if this syntax is correct:
<td class="example1" "textAlignCenter" width="50">
No, that won't work - you need the syntax from the above example, so your td would become:
<td class="example1 textAlignCenter" width="50">
However, my concern is to avoid replacing the deprecated attributes with lots of classes and create "classitis".
Classitis is not as bad, but something to avoid as the point of css is to be efficient. If you look at the structure of your HTML, you may be able to use selectors to select elements, which means you can avoid creating extra classes, and also avoid writing them into the HTML as well. Do have a look at the w3 - it seems a challenge but it quickly becomes easy, and you can come back here for clarification ;)
Anyway, some egs to get you going.
Say you look at your html structure and discover that the
<td class="example1" width="50" align="center">bla</td>
are all children of a tr called "centeredtablerow" (unlikely, but you get the point)
Your css becomes:
.example1 {styles}
#centeredtablerow .example {text-align:center} <-- descendent selector
Remove the align="center" from your HTML, but because you have targeted the td using the classes of the elements that lready exist in the HTML there is no need to create a special class in your css, or write it into your html: One step saved.
Or it might be that all the width=50 td's have been centre aligned. So (if your target users are using browsers that would understand) your css becomes:
.example1 {styles}
td[width=50] (text-align:center} <-- attribute selector
Again, remove the align="center", but no need to add anything extra to the HTML because you've applied the text-align to all the td's already.
Or if the centred td's are the first td in every row:
.example1 {styles}
tr:first-child: (text-align:center} <-- first-child pseudo-class
... and so on ;)
[edit]For clarification[/edit]