Reputation: 490
This is part of a css file:
.imgContainer>img.wide {
max-width: 100%;
max-height: 100%;
height: auto;
}
.imgContainer>img.tall {
max-height: 100%;
max-width: 100%;
width: auto;
}
/* header and its elements*/
#header {
background-color: #1020B8;
color: #FFF;
height: 30px;
margin: 0;
padding: 0 20px;
}
#logo {
color: #FFF;
float: left;
margin: auto 0;
line-height: 30px;
}
The #header
rule is not parsed, why? The #logo
rule is parsed. I have tested this in Chromium and Firefox. If I put the .imgContainer
rules to the end of the file everything works right. I uploaded the whole css file here: https://gist.github.com/anonymous/5911008.
Upvotes: 1
Views: 138
Reputation: 4762
Interesting.
You have a rogue character in your CSS just above the #header
rule:
.imgContainer>img.tall{
max-height:100%;
max-width:100%;
width:auto;
}
/* ^ -- There! */
See it? Just there after the closing brace.
Here's a jsfiddle that reproduces the issue (at least for me; IE9):
I think the character's a U+200B - zero width space.
Interestingly the CSS validator seems not to catch this issue. The spec seems pretty clear on the matter of invalid whitespace though:
The token S in the grammar above stands for white space. Only the characters "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D), and "form feed" (U+000C) can occur in white space. Other space-like characters, such as "em-space" (U+2003) and "ideographic space" (U+3000), are never part of white space.
Upvotes: 6
Reputation: 1180
Does your #header
element get affected by any other CSS rules? A good way to check is the following:
CTL-SHIFT-I
to bring up the Developer's Tools#header
element in the DOM treeUpvotes: 0