在我的第一线我有以下样式:覆盖* CSS样式
* {
text-align:left;
}
其中通过该网站,因为大多数的它运作良好,是靠左对齐。然而部分地区,必须text-align: center
,它不会更新,即使!important
。例如:
table.footer {
text-align:center !important;
}
我如何能解决这个问题的任何想法?
在我的第一线我有以下样式:覆盖* CSS样式
* {
text-align:left;
}
其中通过该网站,因为大多数的它运作良好,是靠左对齐。然而部分地区,必须text-align: center
,它不会更新,即使!important
。例如:
table.footer {
text-align:center !important;
}
我如何能解决这个问题的任何想法?
我guees我知道缺什么。
的table.footer选择符只匹配使用类页脚中的表,而不是它里面的元素
你可以做
table.footer td {
text-align: center;
}
或者甚至更好
html {
text-align: left;
}
* {
text-align: inherit;
}
'*'在CSS特异性最低,甚至写'.footer'将覆盖''选择 –
您必须添加不工作的HTML代码。否则就像在桶里钓鱼一样。 – HerrSerker