hotcoder hotcoder - 5 months ago 18
CSS Question

Element "align" is obsolete or non-standard: what should I use instead?

I have this HTML code:

<td align="center">


and I'm getting this error in Visual Studio 2008 from ReSharper:

"Element "align" is obsolete or nonstandard"


What is the replacement of this code to make it standard?

Answer

You should use text-align in CSS rather than using the obsolete html styling attributes.

td{
text-align:center;
}