Ezilon.com - Target Your Audience, be Seen in Your Region

CSS WAS valid...now generating warnings!?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
Roo's picture
Developer

She has: 836 posts

Joined: Apr 1999

What the hell!?

I've not edited anything anywhere, but suddenly my style sheets *everywhere*. are generating warnings!

Therse were perfectly fine before!

Here are the warnings from my previously fine weblog:

* Line : 8 (Level : 2) Redefinition of margin-left : body
* Line : 9 (Level : 2) Redefinition of margin-right : body
* Line : 10 (Level : 2) Redefinition of margin-top : body
* Line : 11 (Level : 2) Redefinition of margin-bottom : body
* Line : 23 (Level : 1) You have no background-color with your color : p
* Line : 30 (Level : 1) You have no background-color with your color : .italic
* Line : 37 (Level : 1) You have no background-color with your color : H1
* Line : 41 (Level : 1) You have no background-color with your color : a:link
* Line : 42 (Level : 1) You have no background-color with your color : a:visited
* Line : 43 (Level : 1) You have no background-color with your color : a:hover
* Line : 45 (Level : 1) You have no background-color with your color : a.newcolor:link
* Line : 46 (Level : 1) You have no background-color with your color : a.newcolor:visited
* Line : 47 (Level : 1) You have no background-color with your color : a.newcolor:hover
* Line : 55 (Level : 1) You have no color with your background-color : .tdback
* Line : 61 (Level : 1) You have no color with your background-color : .tdback2
* Line : 67 (Level : 1) You have no color with your background-color : .tdside
* Line : 116 (Level : 1) You have no background-color with your color : .icon
* Line : 135 (Level : 1) You have no background-color with your color : .text
* Line : 143 (Level : 1) You have no background-color with your color : .links
* Line : 149 (Level : 1) You have no background-color with your color : .heading
* Line : 155 (Level : 1) You have no background-color with your color : .posthead
* Line : 161 (Level : 1) You have no background-color with your color : .copyright
* Line : 167 (Level : 1) You have no background-color with your color : .emp
* Line : 177 (Level : 1) You have no background-color with your color : .author
* Line : 187 (Level : 1) You have no background-color with your color : H5
* Line : 198 (Level : 1) You have no color with your background-color : .input
* Line : 199 (Level : 1) Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space. : .input
* Line : 208 (Level : 1) You have no color with your background-color : .textarea
* Line : 209 (Level : 1) Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space. : .textarea
* Line : 223 (Level : 1) You have no background-color with your color : .header
* Line : 230 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 230 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 230 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 230 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 230 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 235 (Level : 1) You have no background-color with your color : .navlinks a:link
* Line : 236 (Level : 1) You have no background-color with your color : .navlinks a:visited
* Line : 237 (Level : 1) You have no background-color with your color : .navlinks a:active
* Line : 238 (Level : 1) You have no background-color with your color : .navlinks a:hover
* Line : 246 (Level : 1) You have no background-color with your color : .weekdays
* Line : 254 (Level : 1) You have no background-color with your color : .monthdays a:hover
* Line : 254 (Level : 1) You have no background-color with your color : .monthdays a:hover
* Line : 254 (Level : 1) You have no background-color with your color : .monthdays a:hover
* Line : 254 (Level : 1) You have no background-color with your color : .monthdays a:hover
* Line : 254 (Level : 1) You have no background-color with your color : .monthdays a:hover
* Line : 256 (Level : 1) You have no background-color with your color : .monthdays a:link
* Line : 257 (Level : 1) You have no background-color with your color : .monthdays a:visited
* Line : 258 (Level : 1) You have no background-color with your color : .monthdays a:active
* Line : 259 (Level : 1) You have no background-color with your color : .monthdays a:hover

What am I supposed to do? Add background-color: none; or something? That seems dumb to me....extra lines for no reason.

Renegade's picture
Moderator

He has: 2,951 posts

Joined: Oct 2002

What you have a color:; with no background:; the validator gives a warning, so just do something like this:

color:#000;
background-color:inherit;

'

or

background-color:#000;
color:inherit;

'

Cheng Eu Chew - Renegade
Download:
- Mozilla, Firefox
- Opera
This post may contain peanut traces

Roo's picture
Developer

She has: 836 posts

Joined: Apr 1999

Yeah, but when did that start? These always validated perfectly until now.

Busy's picture
Modrater

He has: 6,157 posts

Joined: May 2001

It's just a warning not an error, if your worried about file size just ignore it, otherwise as Renegade suggests.
Has been like that for a while, they seem to keep changing the goal posts

<?bhb if(broken){ echo("It wasn't me Smiling "); } ?>
Learn HTML the ez way - EzHTML.net

Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...

Megan's picture
Administrator

She has: 10,369 posts

Joined: Jun 1999

That doesn't make any sense. I'd ignore it. It's like the accessibility validator (forget what it's called) that give you a warning on every gif in case it might be flashing and causing seisures Roll eyes Why should you have to have a background color with your color? No reason!

Actually, I would complain to the w3c that stuff like that is making your CSS un-valid.

Greg K's picture
Moderator

He has: 1,676 posts

Joined: Nov 2003

When someone checks it does it still say it is valid CSS (with warnings) or invalid?

-Greg

Roo's picture
Developer

She has: 836 posts

Joined: Apr 1999

It says it's valid but then lists the warnings underneath. I don't like warnings! Im anal like that!

He has: 609 posts

Joined: Jul 2005

Yeah, I receive a lot of warnings like that too. I would simply worry about whether or not it is valid. If you seriously want everything to be right, then correct the warnings, but that is a big pain in the butt and isn't that worth it to tell you the truth. Smiling

-Kurtis
My Art at BrickFish | PHP Starter

They have: 27 posts

Joined: Sep 2005

I agree...

Warnings aren't necessarily bad, I just like my HTML to be valid.

Roo's picture
Developer

She has: 836 posts

Joined: Apr 1999

Okay well once you use shorthand in the body for margins, and declare background-color in *everything* warnings disappear. Dumb, dumb, dumb.

JabezDesign's picture

He has: 3 posts

Joined: Apr 2005

The main reason why CSS is changing when validating is for the new browsers that will and are coming out, especially IE7.

Jabez Design Solutions
Creativity with no limits
Website Address: http://www.jabezdesign.com/
Email Address: [EMAIL=buddy@jabezdesign.com]buddy@jabezdesign.com[/EMAIL]

Subscribe to this feed: Syndicate content