Reputation: 109
I have been trying to validate my CSS, and the following lines continually return the error Parse Error [empty string]
.content { width:80%; text-align:center; margin-left:auto; margin-right:auto;
max-width:400px; border-width:4px; border-style:solid; border-color:#339900;
padding:5px; margin-top:10px; margin-bottom:10px; border-radius:20px;
background-color:#ccffcc; }
#side_link { position:fixed; bottom:5px; right:-4px;
background-image:url('img/FruitfulLogo.png'); height:29px; width:22px;
border-style:solid; border-width:2px; border-bottom-left-radius:5px;
border-top-left-radius:5px; border-color:#F90; background-color:#FF9; }
#side_link:hover { background-image:url('img/FruitfulLogo_over.png'); }
Am I missing something really obvious or really obscure?
Upvotes: 4
Views: 15163
Reputation: 9567
You're using css3 elements while this is still just a draft. The w3 validators aren't yet equiped to deal with a lot of the new properties and attributes and they'll spew out errors on perfectly valid css in some cases. This is one of them.
Just give them a year-or more- to patch things up. Until then, use your own judgement, css is relatively simple syntax wise.
Upvotes: 2
Reputation: 6260
I put it throught the W3C validator and this is what I got back.
3: .content - Property border-radius doesn't exist in CSS level 2.1 but exists in : 20px 20px
7: #side_link - Property border-bottom-left-radius doesn't exist in CSS level 2.1 but exists in : 5px 5px
8: #side_link - Property border-top-left-radius doesn't exist in CSS level 2.1 but exists in : 5px 5px
When checking the CSS3 version it's the same line numbers.
Upvotes: 0
Reputation: 54
Apparently, the border-radius throwing a Parse Error [empty string] is a bug in the W3C CSS validator.
See http://www.w3.org/Bugs/Public/show_bug.cgi?id=11975 .
Upvotes: 3
Reputation: 4450
.content {
margin:10px auto;
padding:5px;
border:4px solid #390;
border-radius:20px;
width:80%;
max-width:400px;
background-color:#cfc;
text-align:center;
}
#side_link {
position:fixed;
bottom:5px;
right:-4px;
width:22px;
height:29px;
border:2px solid #F90;
border-radius:5px 0 5px 0;
background-color:#FF9;
background-image:url('img/FruitfulLogo.png');
}
#side_link:hover {
background-image:url('img/FruitfulLogo_over.png');
}
I'm going to concur that the validator is going nuts, because when I input the above, it shows the errors. But then you have to note that below the errors it outputs all of the above and says "all this stuff is valid."
Upvotes: 0
Reputation: 912
As @BoltClock commented as well, this appears to be a validator bug.
Take out your border-radius items in .content and #side_link and it validates fine. As far as I can see, they are correct.
Upvotes: 0