除非重复规则集,否则CSS将无效

时间:2012-06-18 12:55:41

标签: css

我有两个类,左右两个,左右浮动和清除东西(真正疯狂的东西)。

但这是问题所在。

.dashWrap h3 {
background-color: #666;
border: 2px solid #000;
/*border-radius: 0.5em 0.5em 0 0;*/
text-indent: 0.5em;
}

.dashWrap .dashContent {
/* max-height: 5em;*/
min-height:5em;
overflow-x: hidden;
overflow-y: auto;
border: 2px solid #000;
border-top-color: transparent;
}​

.right  //If I delete or comment this out, left no longer is applied to anything.
{
clear:right;
float:right;
width:35%;
}
.left
 {
float:left;
clear:left;
 }
.right  //If I delete or comment out this, right no longer is applied to anything.
 {
clear:right;
float:right;
width:35%;
 }

这就是我正在编辑的文件中的确切部分。加载网站时实际源文件的唯一区别是,在.dashContent的结束卷曲之后,有这样的:

:一种€<< /强>

导致这种情况的原因是什么?

1 个答案:

答案 0 :(得分:2)

您的文件中有一些不可见或损坏的字符,因此.dashContent之后的第一条规则将被破坏并被浏览器忽略。

尝试删除规则之间的所有内容以删除不可见的字符,如果失败,您可以尝试将规则复制到新文件中。如果所有其他方法都失败了,您可能需要重新键入文件的一部分。