I used the W3C Validator to validate my CSS right from my comp..it then tells me:
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Cute, eh? What is even more cute is that I don't even know what that means.
I also find there are different versions of CSS...3 to be exact.
Oh joy!
So here is a list of errors it found
1) Parse error - Unrecognized : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Welcome to Pixel Dragon Graphics</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1"/> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"/> <meta name="rating" content="general" /> <style type="text/css"> p {color: #00008B) font-size: 100% }
2)Line: 0 Context : body
Invalid number : background-colorattempt to find a semi-colon before the property name. add it
Line: 0 Context : .centerCol
Invalid number : marginattempt to find a semi-colon before the property name. add it
Line: 0 Context : .centerCol
Invalid number : marginonly 0 can be a length. You must put an unit after your number : 100px 130px 170
3)Parse error - Unrecognized : </style> </head> <body> <div class="topBanner"><img alt="logo1" src=http://www.webdeveloper.com/forum/archive/index.php/"images/logo1.jpg" height="100" width="1020" /></div> <div class="leftCol" style="left: 1px; top: 100px; width: 145px; height: 376px"> <p class="p2">
Basically all my image links as well as the text links on my right column, on the bottom of my center column and the text itself in the center column.
So what is a parse tree and is a certain type of CSS needed to work with XHTML?
My XHTML validates but not the CSS...then am told I need valid HTML ...eh?
I also have an attachment of my code
Actually I need to rephrase this..for all my links, text and Image, as well as the text in my center column...I get a Parse Error. What does that mean?If you're validating your CSS by going to the W3C site and uploading your file to the CSS validator, then it won't work, as it can only be CSS in the file.
The XHTML was valid, and you forgot a unit identifier or semi-colon here and there in the CSS.as it can only be CSS in the file.
What does that mean? Only load up the CSS Code itself?
By the way, thanks for the code..I am making a second index file.
You guys are way smarter than I!
P.S I ran the CSS throught he validator and got this:
Parse error - Unrecognized : <style type="text/css"> p {color: #00008B; font-size: 100%; }
I thought this was a general classification for font weight..or should I use "regular" instead of 100%
Thanks again for the fixed CSSOriginally posted by Dark Dragon
What does that mean? Only load up the CSS Code itself?
Yeah. I just went to the W3C CSS validator, and chose to validate via the textarea. Then I just C&P'ed the CSS from the file to the textarea, and then validated it.
Originally posted by Dark Dragon
By the way, thanks for the code..I am making a second index file.
You guys are way smarter than I
No problemo. CSS is pretty tricky; miss one semi-colon or hash and things just go all haywire! What about the <style type="text/css"> p {color: #00008B; font-size: 100%; } ?
Too weird.....Originally posted by Dark Dragon
What about the <style type="text/css"> p {color: #00008B; font-size: 100%; } ?
Too weird.....
... what about it?
<style type="text/css"> p {color: #00008B; font-size: 100%; }
CSS Validator claims it is unrecognized...what is there to not be recognized?????Originally posted by Dark Dragon
<style type="text/css"> p {color: #00008B; font-size: 100%; }
CSS Validator claims it is unrecognized...what is there to not be recognized?????
If you're using the CSS validator, it's 'cause the <style type="text/css"> is HTML, and thus is deemed invalid CSS. So how do I fix it then if it is the beginning of the CSS tag?I'm not sure I follow...
If it's causing your CSS to not validate, then don't include it when you validate the CSS. When using the CSS validator to validate your CSS, the only thing that should be fed to the validator is CSS; pure CSS.Okay..got it and did it..however it still gives me this:
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Isn't CSS supposed to function with XHTML?
I am a bit confuzzled here now.
It doesn't show any errors or warnings but it doesn't say it validates either like it did when it validated my XHTML.It does say,
No error or warning found
Congratulations!
Right?
I'm assuming what you're talking about is this li'l line that appears just before it lists your valid CSS:
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
All that's really doing is just telling you that though your CSS is valid, your page may be all screwy 'cause your HTML is all defunked."Defunked"??????
I am using XHTML..I assume CSS is compatible with it. Am I wrong?No, CSS and XHTML go hand and hand... XHTML without CSS is bland. CSS without content (XHTML) is blank.Well..as Paul Jr pointed out:
All that's really doing is just telling you that though your CSS is valid, your page may be all screwy 'cause your HTML is all defunked.
But I want to use the XHTML..it validates so why doesn't the CSS....the validator is being ambiguous, it delights in making my brain hurt.Originally posted by Dark Dragon
Well..as Paul Jr pointed out:
But I want to use the XHTML..it validates so why doesn't the CSS....the validator is being ambiguous, it delights in making my brain hurt.
Noo! You have it all wrong. Your CSS is valid, and so is your XHTML! That's just telling you that your CSS isn't gonna do squat without valid (X)HTML -- which is what you have! So you're in the clear. Everything validates (as far as I know).I see. Well why doesn't it just say that instead of giving me weird things?
Anyways thanks Paul for clearing it up for me.. As my title implies..I'm hopeless. Originally posted by Dark Dragon
I see. Well why doesn't it just say that instead of giving me weird things?
Y'know... that's a really good question!
Originally posted by Dark Dragon
Anyways thanks Paul for clearing it up for me.. As my title implies..I'm hopeless.
No problemo, glad to help.
Bah! You aren't hopeless, you must keep positive! So how do I get a valid CSS logo if it won't give me one?
Nevermind..I think I found it.Heh, cuz it's an a-hole. It' doing that to me too right now, but I suspect once I upload to my server, T35, instead of my localhost server, and use a referrer or a link, it'll straighten out.I'm so glad I found this thread because I have a similiar question.
I put the CSS into the 'upload', 'url', and 'textarea' box, and still I come up with basically the same stuff.
Line: 23
Parse error - Unrecognized : { font-family: verdana,arial,sans-serif; font-style: normal; font-variant: expanded; font-weight: normal; font-size: 8px; cursor: crosshair; text-align: justify; text-decoration: none; scrollbar-arrow-color:#32004B; scrollbar-darkshadow-color:#E0CCE3; scrollbar-face-color:#E0CCE3; scrollbar-track-color:#E0CCE3;}
Everything else is validated.
I attached my CSS as a txt file. Is there anyone that can tell me what I'm doing wrong?
Thanks! There is no selector or you have closed body unintentionally.Awesome, Thanks. I don't exactly know what you mean by selector, but I did have a } after the background body stuff. Now, if I deleted that, I don't have to do { to reopen the font and scrollbar stuff that was orginially errored, right?well, now it's saying this.
Line: 12 Context : Body
Invalid number : font-variant expanded is not a font-variant value : expanded
Line: 19 Context : Body
Property scrollbar-arrow-color doesn't exist : #32004b
Line: 20 Context : Body
Property scrollbar-darkshadow-color doesn't exist : #e0cce3
Line: 21 Context : Body
Property scrollbar-face-color doesn't exist : #e0cce3
Line: 22 Context : Body
Property scrollbar-track-color doesn't exist : #e0cce3
How do I fix that?I fixed that font-variant problem. But other than that, I'm stuck.The scrollbar properties will not validate, they are IE specificOooh. Okay, thanks!
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Cute, eh? What is even more cute is that I don't even know what that means.
I also find there are different versions of CSS...3 to be exact.
Oh joy!
So here is a list of errors it found
1) Parse error - Unrecognized : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Welcome to Pixel Dragon Graphics</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1"/> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"/> <meta name="rating" content="general" /> <style type="text/css"> p {color: #00008B) font-size: 100% }
2)Line: 0 Context : body
Invalid number : background-colorattempt to find a semi-colon before the property name. add it
Line: 0 Context : .centerCol
Invalid number : marginattempt to find a semi-colon before the property name. add it
Line: 0 Context : .centerCol
Invalid number : marginonly 0 can be a length. You must put an unit after your number : 100px 130px 170
3)Parse error - Unrecognized : </style> </head> <body> <div class="topBanner"><img alt="logo1" src=http://www.webdeveloper.com/forum/archive/index.php/"images/logo1.jpg" height="100" width="1020" /></div> <div class="leftCol" style="left: 1px; top: 100px; width: 145px; height: 376px"> <p class="p2">
Basically all my image links as well as the text links on my right column, on the bottom of my center column and the text itself in the center column.
So what is a parse tree and is a certain type of CSS needed to work with XHTML?
My XHTML validates but not the CSS...then am told I need valid HTML ...eh?
I also have an attachment of my code
Actually I need to rephrase this..for all my links, text and Image, as well as the text in my center column...I get a Parse Error. What does that mean?If you're validating your CSS by going to the W3C site and uploading your file to the CSS validator, then it won't work, as it can only be CSS in the file.
The XHTML was valid, and you forgot a unit identifier or semi-colon here and there in the CSS.as it can only be CSS in the file.
What does that mean? Only load up the CSS Code itself?
By the way, thanks for the code..I am making a second index file.
You guys are way smarter than I!
P.S I ran the CSS throught he validator and got this:
Parse error - Unrecognized : <style type="text/css"> p {color: #00008B; font-size: 100%; }
I thought this was a general classification for font weight..or should I use "regular" instead of 100%
Thanks again for the fixed CSSOriginally posted by Dark Dragon
What does that mean? Only load up the CSS Code itself?
Yeah. I just went to the W3C CSS validator, and chose to validate via the textarea. Then I just C&P'ed the CSS from the file to the textarea, and then validated it.
Originally posted by Dark Dragon
By the way, thanks for the code..I am making a second index file.
You guys are way smarter than I
No problemo. CSS is pretty tricky; miss one semi-colon or hash and things just go all haywire! What about the <style type="text/css"> p {color: #00008B; font-size: 100%; } ?
Too weird.....Originally posted by Dark Dragon
What about the <style type="text/css"> p {color: #00008B; font-size: 100%; } ?
Too weird.....
... what about it?
<style type="text/css"> p {color: #00008B; font-size: 100%; }
CSS Validator claims it is unrecognized...what is there to not be recognized?????Originally posted by Dark Dragon
<style type="text/css"> p {color: #00008B; font-size: 100%; }
CSS Validator claims it is unrecognized...what is there to not be recognized?????
If you're using the CSS validator, it's 'cause the <style type="text/css"> is HTML, and thus is deemed invalid CSS. So how do I fix it then if it is the beginning of the CSS tag?I'm not sure I follow...
If it's causing your CSS to not validate, then don't include it when you validate the CSS. When using the CSS validator to validate your CSS, the only thing that should be fed to the validator is CSS; pure CSS.Okay..got it and did it..however it still gives me this:
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Isn't CSS supposed to function with XHTML?
I am a bit confuzzled here now.
It doesn't show any errors or warnings but it doesn't say it validates either like it did when it validated my XHTML.It does say,
No error or warning found
Congratulations!
Right?
I'm assuming what you're talking about is this li'l line that appears just before it lists your valid CSS:
To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
All that's really doing is just telling you that though your CSS is valid, your page may be all screwy 'cause your HTML is all defunked."Defunked"??????
I am using XHTML..I assume CSS is compatible with it. Am I wrong?No, CSS and XHTML go hand and hand... XHTML without CSS is bland. CSS without content (XHTML) is blank.Well..as Paul Jr pointed out:
All that's really doing is just telling you that though your CSS is valid, your page may be all screwy 'cause your HTML is all defunked.
But I want to use the XHTML..it validates so why doesn't the CSS....the validator is being ambiguous, it delights in making my brain hurt.Originally posted by Dark Dragon
Well..as Paul Jr pointed out:
But I want to use the XHTML..it validates so why doesn't the CSS....the validator is being ambiguous, it delights in making my brain hurt.
Noo! You have it all wrong. Your CSS is valid, and so is your XHTML! That's just telling you that your CSS isn't gonna do squat without valid (X)HTML -- which is what you have! So you're in the clear. Everything validates (as far as I know).I see. Well why doesn't it just say that instead of giving me weird things?
Anyways thanks Paul for clearing it up for me.. As my title implies..I'm hopeless. Originally posted by Dark Dragon
I see. Well why doesn't it just say that instead of giving me weird things?
Y'know... that's a really good question!
Originally posted by Dark Dragon
Anyways thanks Paul for clearing it up for me.. As my title implies..I'm hopeless.
No problemo, glad to help.
Bah! You aren't hopeless, you must keep positive! So how do I get a valid CSS logo if it won't give me one?
Nevermind..I think I found it.Heh, cuz it's an a-hole. It' doing that to me too right now, but I suspect once I upload to my server, T35, instead of my localhost server, and use a referrer or a link, it'll straighten out.I'm so glad I found this thread because I have a similiar question.
I put the CSS into the 'upload', 'url', and 'textarea' box, and still I come up with basically the same stuff.
Line: 23
Parse error - Unrecognized : { font-family: verdana,arial,sans-serif; font-style: normal; font-variant: expanded; font-weight: normal; font-size: 8px; cursor: crosshair; text-align: justify; text-decoration: none; scrollbar-arrow-color:#32004B; scrollbar-darkshadow-color:#E0CCE3; scrollbar-face-color:#E0CCE3; scrollbar-track-color:#E0CCE3;}
Everything else is validated.
I attached my CSS as a txt file. Is there anyone that can tell me what I'm doing wrong?
Thanks! There is no selector or you have closed body unintentionally.Awesome, Thanks. I don't exactly know what you mean by selector, but I did have a } after the background body stuff. Now, if I deleted that, I don't have to do { to reopen the font and scrollbar stuff that was orginially errored, right?well, now it's saying this.
Line: 12 Context : Body
Invalid number : font-variant expanded is not a font-variant value : expanded
Line: 19 Context : Body
Property scrollbar-arrow-color doesn't exist : #32004b
Line: 20 Context : Body
Property scrollbar-darkshadow-color doesn't exist : #e0cce3
Line: 21 Context : Body
Property scrollbar-face-color doesn't exist : #e0cce3
Line: 22 Context : Body
Property scrollbar-track-color doesn't exist : #e0cce3
How do I fix that?I fixed that font-variant problem. But other than that, I'm stuck.The scrollbar properties will not validate, they are IE specificOooh. Okay, thanks!