5 replies [Last post]
Tom L
Tom L's picture
Offline
Enthusiast
Liverpool
Last seen: 10 years 41 weeks ago
Liverpool
Timezone: GMT+1
Joined: 2005-09-23
Posts: 91
Points: 2

not sure where to put queries (and pains!) about validation. so i apologise if this is in the wrong place.

anyway, so I've just started doing this site: http://tomleadbetter.co.uk/stmarys/index.html

the css for which is : http://tomleadbetter.co.uk/stmarys/css/style.css

so I stick it into the w3c validation thing and I get loads and loads of warnings. link

loads of :

"Same colors for color and background-color in two contexts"

now it works ok, and yes, technically it validates, but what do all those mean? surely every site is going to have something with the same color? :? Crying

my other site (link) validates fine has the same problem.

ok, so i can put a background-color or a color in when there is one missing, but how can I stop the "Same colors for color and background-color in two contexts" problem?

any ideas, obvious or not, are extremely welcome.

thanks in advance,

Tom

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 9 years 18 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

W3c Validation woes

Its just a warning, a be careful something could be inappropriate. Obviously if the colour and background colour don't appear together you will be fine.

w3c appear to have been updating their validator quite a bit recently. Taking into account things like the possibility of user stylesheets. Hence the warning about color or background-color when only one is specified. If the specified colour clashes with a user specified background or colour there is a problem.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 3 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

W3c Validation woes

Well you could of course re-state the background you have on #subbanner in #subanner p then the validator would be happy and you would have needlessly bloated your file with a rule that was entirely unnecessary you could also use background inherit, again pretty pointless. These are just warnings and sadly the validator can't judge your rules sets in context, which is why it would be far better that it just gave one general reminder that it has found a lack of matching values and that you should check carefully. It's causing many people to panick, I wish they would explain a little the nature of the messages.

There is a move afoot to gently tap the jigsaw folk on the shoulder and ask them if it's such a good idea in it's present form. So they will probably disappear again, yes they always used to be mentioned then it stopped now it's started again :roll:

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Tom L
Tom L's picture
Offline
Enthusiast
Liverpool
Last seen: 10 years 41 weeks ago
Liverpool
Timezone: GMT+1
Joined: 2005-09-23
Posts: 91
Points: 2

W3c Validation woes

cheers for that.

so its more an "advice/guideline" than a Warning?

thanks W3C! Evil

there is also this one:

http://www.htmlhelp.com/tools/csscheck/

which i've used for html/xhtml checking and its pretty good, but for the css it keeps telling me about

Quote:

Warning: The shorthand background property is more widely supported than background-color.

eh?!

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 12 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

W3c Validation woes

Quote:

Warning: The shorthand background property is more widely supported than background-color.

In other words:

background: #000000; is more commonly understood by browsers than background-color: #000000;

MMM

I seem to remember a problem with splitting up the background properties for early version of MAC IE, can't remember for sure.

Trevor

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 3 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

W3c Validation woes

This is always a common piece of advice to use the shorthand background property, and indeed one should use as much shorthand as possible.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me