元素“对齐”是过时的还是非标准的:我应该用什么来代替? [英] Element "align" is obsolete or non-standard: what should I use instead?

查看:226
本文介绍了元素“对齐”是过时的还是非标准的:我应该用什么来代替?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的HTML代码:

 < TD对齐= 中心 > 

和我从ReSharper的获取Visual Studio 2008中此错误:



'pre> 元素 对齐 是过时的或非标准的



'p>什么是更换该代码,使其标准?


解决方案

您应该使用文本对齐在CSS,而不是使用废弃的HTML样式属性。

  TD {
text-align:center;
}


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?

解决方案

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

td{
text-align:center;
}

这篇关于元素“对齐”是过时的还是非标准的:我应该用什么来代替?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆