这是一个简单的CSS问题。我的网站存在以下问题:
#main-content ol {
list-style-type: decimal;
padding-left: 25px;} /* abc.css (line 140) */
#contentWrapper p, #contentWrapper ul, #contentWrapper ol, #lmBlurbsArchive {
color: #666666;
font-size: 1.1em;
margin-bottom: 12px;
margin-left: 0;
margin-right: 0;
margin-top: 0;} /* abc.css (line 69) */
/* Code below being striped out/ over written by other class above */
ol.upper-roman {
list-style-type: upper-roman;
最佳答案
#main-content ol.upper-roman
应该足够具体以“获胜”。
因此,在CSS中,将ol.upper-roman
更改为上述选择器。
阅读以下内容:
http://css-tricks.com/specifics-on-css-specificity/
http://www.w3.org/TR/CSS2/cascade.html#specificity
关于html - 该类(class)被其他类(class)覆盖,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5093205/