Dirx Posted October 3, 2005 Share Posted October 3, 2005 First of, I'm a CSS Newbie...So anyway, I've got a CSS, and I've ran it through W3C's CSS Vaildator, and got a heap of warnings (have no clue what those warnings mean) something about not having a Colour...(I did put colour as Color) and so i went to w3schools, to see whats going and to see if my css is more or less following the examples...it is, so i copy/pasted p{ background-color: #00ff00} In put that in to the W3C's CSS Vaildator, and got the same warnings....So, err....Help? I have no clue whats this means... Or is it something that i should ignore?And again, Please be Kind, I am a Newbie...at CSS i mean. Link to comment Share on other sites More sharing options...
alzable Posted October 3, 2005 Share Posted October 3, 2005 Weird, it happens to me too...I wonder what it is...alzable Link to comment Share on other sites More sharing options...
username132 Posted October 3, 2005 Share Posted October 3, 2005 Do you use that color for other things on the page? It gives warnings if it thinks text will end up on a background the same colour...Otherwise, I usep {background: #00ff00;}See if that gives the same feedback.Also, be aware that a warning from the validator isn't necessarily an error. You can still have warnings and valid code. Link to comment Share on other sites More sharing options...
Dirx Posted October 3, 2005 Author Share Posted October 3, 2005 Line : 2 (Level : 1) You have no color with your background-color : pfrom inputtingp {background: #00ff00;} So if i have a warning, the coding is still valid, just not playing well with the validator?I used another CSS Validator, and got another Warning, had something with the colour, not being the colour and should have something else...I have noe clue...I'll try and find the url later...Thanks for the Help BTW. Link to comment Share on other sites More sharing options...
Jack McKalling Posted October 3, 2005 Share Posted October 3, 2005 I've had exactly the same before, only then it was because of the colornames that I used, instead of the hexvalues. The names are not valid according to the validator...Else, I don't know what is wrong Your CSS seems totally and completely valid Link to comment Share on other sites More sharing options...
F-Man Posted October 3, 2005 Share Posted October 3, 2005 Line : 2 (Level : 1) You have no color with your background-color : p Seems like it wants you to also add color. p { Â background-color: #0f0; Â color: black;} Link to comment Share on other sites More sharing options...
Jack McKalling Posted October 3, 2005 Share Posted October 3, 2005 Nooo, that really couldn't be it What does, I have no clue sorry Link to comment Share on other sites More sharing options...
boen_robot Posted October 3, 2005 Share Posted October 3, 2005 Well... Actually I checked the code that F-Man suggested and it turned out as a valid CSS. I now realize why does the validator requres such. It's because it presumes you define a new background color that would need a new color for the text inside in order to look good. Or at least that's what I think...Anyway. The code F-Man proveided is the one you need Dirx . Link to comment Share on other sites More sharing options...
Dirx Posted October 4, 2005 Author Share Posted October 4, 2005 I was using that as an Example, Thats from W3Schools CSS Background Colour lession thing.But now a question about colour...If i say black and put the hex code as #FFFFFF, what would show up? (#FFFFFF is white isn't it...?) Link to comment Share on other sites More sharing options...
Jack McKalling Posted October 4, 2005 Share Posted October 4, 2005 If you say color is 'black', and put in the hex of white in the background color it will be sort of negative standard page with letters White in black. Or didn't I understood you? This would be valid though..I mean, both hex and colorname aren't possible to give for both same property, so it is or the text color (color:...) or the background (background-color:...). Link to comment Share on other sites More sharing options...
username132 Posted October 4, 2005 Share Posted October 4, 2005 I think I understand now. The validator wanted a colour to be specified for the text because what if some bozo viewing your site had set their browser default text colour to the same colour as your background? Uh-oh-spaghetti-Os... Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted April 23, 2007 Share Posted April 23, 2007 Yes, a background-color set needs a color set as well because of accessibility purposes. It ensures that both colours contrast each other a sufficient amount so that you can see them easily. And yes, using custom styles in the browser can override settings, which may or may not be a good thing. Link to comment Share on other sites More sharing options...
Vetruvet Posted May 5, 2007 Share Posted May 5, 2007 Is there any "transparent" color that you could set for the background to "trick" the validator? Link to comment Share on other sites More sharing options...
Guest cressets Posted May 7, 2007 Share Posted May 7, 2007 hi, what is css validators??is it a software to download?? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now