Jump to content
Sign in to follow this  
40043mo

CSS Validation parse error

Recommended Posts

Some day, in the distant future, I will be one of the members of these forums able to help others resolve the issues they have with their code, but not today.My entire style sheet validates as valid CSS 2.1.......... Except my first rule.Parse Error - body { padding : 10px 10px 10px 10px; background-color : #FFFFCA; margin-right : 12%; margin-left : 12%; border : 5px double; border-color : #19619A; font-family :Ariel, Verdana, Geneva, sans-serif; } Valid CSS information#header { margin-bottom : 50px;} I figured - No problem! I'll just eliminate 1 declaration at a time, then revalidate, to identify which part of the rule is causing the problem because I don't see what is wrong. No joy! I wound up completely deleting my first rule, 1 delaration at a time. Only to be completely dumbfounded, when revalidating, to find the same error stated for my new, first rule:Parse Error - #header { margin-bottom : 50px; }, which the validator had considered valid just moments before when it was still my second rule.The top portion of my style sheet with the 1st few rules follows: /* eAuctionsPlus.com Cascading Style Sheet Version: 6.27 Last modified: 1/2/08 */body { padding : 10px 10px 10px 10px; background-color : #FFFFCA; margin-right : 12%; margin-left : 12%; border : 5px double; border-color : #19619A; font-family : ariel, verdana, geneva, sans-serif;}#header { margin-bottom : 50px;}h4.Lhead, h5.Lhead, h6.Lhead { text-decoration : underline;}I wonder what is causing the parse error, regardless of which rule is listed first?

Share this post


Link to post
Share on other sites

Can you post a link to your site, please?Or at least post the entire (complete) CSS file?

Share this post


Link to post
Share on other sites

Sure. Here's the entire file. /* eAuctionsPlus.com Cascading Style Sheet Author: Keith Harrod Version: 1.08 Last modified: 1/2/08 Last Validation attempt: 1/4/08 Failed - Parse Error in first style rule, regardless which rule was first. */body { padding : 10px 10px 10px 10px; background-color : #FFFFCA; margin-right : 12%; margin-left : 12%; border : 5px double; border-color : #19619A; font-family : arial, verdana, geneva, sans-serif;}#header { margin-bottom : 50px;}h4.Lhead, h5.Lhead, h6.Lhead { text-decoration : underline;}h1.example, h2.example, h3.example, h4.example, h5.example, h6.example { text-align : center;}h1, h2, h3 { text-align : center; color : #19619A;}p#greeting { margin-top : 40px; padding : 20px; }#form { width : 300px; float : right;}#mailto { width : 300px; float : right;}div { font-family : arial, verdana, geneva, sans-serif;}div.pagetitle { text-align : center; font-size : 24pt; font-weight : bold; color : #19619A;}div.author { text-align : center; font-size : 14pt; font-weight : bold; font-style : italic; color : #19619A;}div.entry { background:#EEEEEE; border : 2px solid #19619A; margin : 20px; padding : 10px;}div.title { text-align : left; font-size : 14pt; font-weight : bold; color : #19619A;}div.text { text-align : left; font-size : 11pt;}div.footer { text-align : center; font-size : 8pt; color : #19619A; clear : right; clear : left; }a:link, a:visited, a:active { color : #19619A; text-decoration : none;}a:hover { font-weight : bold; text-decoration : none;}

Share this post


Link to post
Share on other sites

Ariel is supposed to be arial, and I'm not too sure you can have 4 font families at once...but then again I've never tried. Is this your first style sheet?

Share this post


Link to post
Share on other sites

I copied and pasted your CSS into the validator myself and there are no errors or warnings.

Share this post


Link to post
Share on other sites
Ariel is supposed to be arial, and I'm not too sure you can have 4 font families at once...but then again I've never tried. Is this your first style sheet?
Yes, my first.If the browser doesn't have the first font, it will try number 2, then #3, etc.My first 2 are common in Microsoft browsers, #3 is common on Mac, and the last lets the browser select any sans-seriffont it has available.Yep, I've spelled Arial wrong. Thanks.

Share this post


Link to post
Share on other sites
I copied and pasted your CSS into the validator myself and there are no errors or warnings.
I was checking it by file upload.Today, when I validate it by file upload, I get the same parse error in my body rule as stated in my original post.When I validate the file from My Documents, by direct input, I get a parse error (empty string) in my div.entry rule. :)When I validate the file from the file listing here on the forum, by direct input like you did, I get a parse error (empty string) in my div.text rule.Maybe I'll just take your word for it that it's valid, since I can't get a straight answer from the Validator itself.

Share this post


Link to post
Share on other sites

Late reply for assiting you, but what text Editor are you using?Does your Editor allow you to specify the Character encoding? can you save it as a UTF without BOM?Try that and see if there was a BOM at the start of the file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×