Click to See Complete Forum and Search --> : CSS validator is screwy!
Sunny G
10-03-2005, 12:11 PM
Hi everybody! Take a look at this--I haven't had problems like this before.
Is this really a problem, or is the validator actually messed up?
Attached is a screenshot of the validation.
Here is a link to the Page with the weird CSS. The HTML part is not OK. I haven't uploaded the fixed version yet.
http://www.team847.com/New/css.css
http://www.team847.com/New/
David Harrison
10-03-2005, 12:40 PM
I fail to see what your point is ... the validator is right.
JPnyc
10-03-2005, 12:43 PM
The new specs want bg colors to be set for all elements, even if it's no color. Things like this nonsense are what make me loathe the W3C. Sometimes I think the W3C is composed of the same people who designed the NJ road system.
David Harrison
10-03-2005, 12:51 PM
The new specs want bg colors to be set for all elements, even if it's no color. Things like this nonsense are what make me loathe the W3C.Um ... no it doesn't, and if you notice they are warnings not errors, so they're not forcing you to do anything. They just want you to be aware that you have set a text colour with no background colour or set a background colour with no text colour.
The text colour is inherited from parent elements, so if you make a seemingly simple change in the CSS to one rule to get something to look right on one page, it could affect a completely different element on another and make the text in it unreadable due to the background colour.
If you had used the WDG cssCheck (http://www.htmlhelp.com/tools/csscheck/), you would see all those warnings and more, plus the errors that the W3C missed!
Sunny G
10-04-2005, 12:02 PM
WHAT?!?!?!?!?!
Backgrounds for ALL elements?!
That's ridiculous!
Crud, I wanted my page to validate for CSS, and to do so I have to put backgrounds on everything! I put background-color: none; on all the links and it still is warning me about that.
As an error it says this for #TITLE (A div). It has a single background image.
Parse error - Unrecognized : -moz-background-origin: initial;
Here is the CSS for it.
#TITLE {
border: 2px solid #ffcc00;
width: 700px;
height: 96px;
margin-bottom: 10px;
background: url('caution_banner.gif') no-repeat 50% 50%;
background-color: #ffffff;
}
NogDog
10-04-2005, 12:29 PM
WHAT?!?!?!?!?!
Backgrounds for ALL elements?!
That's ridiculous!
Not for all elements, just for any element for which you specify a color (or vice versa). And again, it's just a warning that there might be a potential for a problem, not that it's illegal. (You still get the "Congratulations! Valid CSS! This document validates as CSS!" message if all you have are warnings but no errors.)
I put background-color: none; on all the links and it still is warning me about that.There is no property value none for background-color http://www.w3.org/TR/CSS21/colors.html#background-properties
Sunny G
10-07-2005, 11:51 AM
OK, I made my page validate. I put backgrounds on the links and colors in the divs (Even those which don't need them).
I was just wondering if my CSS is OK or somthing, because when You mouse over a visited link, the background color on the link changes- That should not happen in the CSS rules I specified. What's wrong here?
Attached is the page I'm working on... I'm sure many of you have seen it before. I can't upload it because I think there is something wrong with the server.
W3C, You're crazy.
Incorrectly referenced:
#SUB_MENU_CONTAIN DIV A:hover, #SUB_MENU_CONTAIN DIV A:active {
background-color:#454545;
text-decoration: none;
font-size:10pt;
color:#FF0000;
}
and the others as well!
Sunny G
10-09-2005, 12:05 PM
Incorrectly referenced:
Oh.
Sunny G
10-11-2005, 12:32 PM
OK, I fixed that but it won't give me the "congrats, your css validates" message.
I really want my css to validate, so what do I do? :confused:
Sunny G
10-12-2005, 12:38 PM
OK, this is really weird. I uploaded the stylesheet and it validated (And I made no changes to it). Well, now my template is done and I can begin a new construction of http://www.team847.com/
Here is the template online
http://www.team847.com/New
I thank all of you on the forum who have helped me out with this template!
It really means alot to me.
Robert Wellock
10-14-2005, 09:04 AM
Well, think of this: white text on a white background is sometimes like looking through a blizzard and that's why it asks for both.