Forum Moderators: not2easy
I am new to CSS and am having a frustrating time trying to interpret the css validator error messages. In particular, I keep getting this vague message which means nothing obvious to me:
Line: 54 Context : px
Parse Error - px;
Line: 55
Parse Error - : bold} p
What is a parse error? Are there code words which will help me to figure it out? I am taking a class in css and need to have no errors before I can hand in my work and this has me stumped.
Is there was a book out there, interpreting css validator errors?
Jane
And a few of the surrounding lines?
The CSS validator basically checks for well-formed CSS. Any error generated will be a syntax error - as in, something not done right. Examples:
p { background: #f00
border: 1px solid #00f; } Will return an error because there was no semi-colon at the end of the background property statement. Thus, it believes the one entire line is all for the background property.
Check semi-colons, and curly brackets are all in their rightful spots, and mis-spelled selectors/properties/etc.
Of course I have--and I saw nothing obvious. Here is a snippet of the code:
color: #fffded;
padding: 20px;
border-width:8px;
border-style: groove;
border-color: green;
}
p {
color: #fffded;
background-color: #333333;
font-family: arial, sans-serif;
font-size: 12px;
}
Line 54 corresponds to the closing bracket before the "p" and (obviously) line 55 is on the line right below it. Do you see the problem? I get many of the errors but this one has me scratching my head.
Jane
Have you tried more than one validator? Do they all point to the same spot?
What happens if you combine your border declaration?
As in
border: 1px solid orange;
(Are you allowed to within the parameters of the assignment?)
Rough to have to track down errors when for so many "close enough" is good enough! Good luck...