开发者

Overriding existing CSS when using a CMS template

I'm doing some custom dev work on an installation of the Whitehouse WordPress theme. And, it appears that some style rules defined within the theme are overriding various features of the tags I'm using, making it extremely annoying to work.

The cellspacing and cellpadding attributes s开发者_如何学运维eem to be overridden, all content in table cells aligns to the bottom, and strange gaps and spaces appear after various elements.

I don't know enough about the theme to know what rules are causing which issues - is there any way to make a browser ignore ALL CSS declarations for a specific element or elements except the inline declarations I add to the tags myself?


the CELLSPACING and CELLPADDING attributes seem to be overridden,

Yes, as the specification says: The UA may choose to honor presentational attributes in an HTML source document. If so, these attributes are translated to the corresponding CSS rules with specificity equal to 0, and are treated as if they were inserted at the start of the author style sheet

I don't know enough about the theme to know what rules are causing which issues

Use a DOM inspector such as Firebug, Dragonfly or the ones built into Chrome, Safari and (recent versions of) Internet Explorer. They will tell you which rules are applied to which elements.

is there any way to make a browser ignore ALL css declarations for a specific element or elements except the inline declarations I add to the tags myself?

No, there is not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜