gpt4 book ai didi

html - 重置影响内联样式和表格属性的 CSS

转载 作者:太空宇宙 更新时间:2023-11-03 23:40:13 24 4
gpt4 key购买 nike

我有

reset.css

/* Resets default browser CSS. */

html, body, div, span, object, iframe,

h1, h2, h3, h4, h5, h6, p, blockquote, pre,

a, abbr, acronym, address, code,

del, dfn, em, img, q, dl, dt, dd, ol, ul, li,

fieldset, form, label, legend,

table, caption, tbody, tfoot, thead, tr, th, td {

margin: 0;

padding: 0;

border: 0;

font-weight: inherit;

font-style: inherit;

font-size: 100%;

font-family: inherit;

vertical-align: baseline;

}



/* Tables still need 'cellspacing="0"' in the markup. */

table { border-collapse: separate; border-spacing: 0; }

caption, th, td { text-align: left; font-weight: normal; }

table, td, th { vertical-align: middle; }



/* Remove possible quote marks (") from <q>, <blockquote>. */

blockquote:before, blockquote:after, q:before, q:after { content: ""; }

blockquote, q { quotes: "" ""; }

我的问题是,当我在表格上应用某些样式(最重要的是单元格填充)时,这些样式并未应用。我正在应用的样式是:

<table class='roaming-table' width='310' cellpadding='6' cellspacing='0' border='0' style='border-color:#00abbd; border-width:0px; border-style:solid; padding:3px'>

如果我检查网页并取消选中重置样式,mystyle 将相应地应用。

PS 我不能删除 reset.css 因为这是在其他地方做其他事情

可以在这里看到 fiddle :http://jsfiddle.net/AAr9N/

谁能帮我解决这个问题。

最佳答案

如果它是您需要的 cellpadding 属性,如果您的页面上已经加载了一个重置​​的 css 文件,那么最好只使用 css 进行布局和定位。

你可以添加这个:

.roaming-table td
{
padding:6px;

}

这是一个 fiddle :http://jsfiddle.net/AAr9N/4/

关于html - 重置影响内联样式和表格属性的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23083074/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com