取消全局css继承
我有一个全局重置规则:
* {
margin:0px;
padding:0px;
}
我还有很多带有预定义单元格填充值的表格。然而,全局重置规则正在杀死所有单元格填充值。无需为每个表格创建特定的 CSS 规则即可恢复单元格填充的最佳方法是什么? (有很多表格。)
编辑:澄清一下,如果我取出 padding:0px;
规则,那么所有表格都会看起来很完美。但是,我仍然需要对其他东西进行全局重置。
I have a global reset rule:
* {
margin:0px;
padding:0px;
}
I also have a LOT of tables with pre-defined cellpadding values. However, the global reset rule is killing all the cellpadding values. What would be the best way to get the cellpadding back without having to create a specific css rule for each table? (There are a lot of tables.)
EDIT: to clarify, if I took out the padding:0px;
rule then all the tables would look perfect. But, I still need the global reset for other stuff.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最好的选择是使用重置表,例如 Eric Meyer 的,并剪裁那里的桌子。
奇怪的是,内联格式化应该胜过全局格式化。
Your best bet is to use a reset sheet like Eric Meyer's, and cut-out tables from there.
What is odd is that inline formatting should be trumping global formatting.
和/或可能
和/或可能 td、th 和所有其他表相关元素。
and/or possibly
and/or possibly td, th and all other table related elements.