Old 09-07-2003, 10:37   #1 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
css validation

css validates correctly but warnings

* Line : 2 Level : 1 You have no color with your background-color : body
* Line : 12 Level : 1 You have no background-color with your color : #top
* Line : 23 Level : 1 You have no color with your background-color : #banner
* Line : 35 Level : 1 You have no background-color with your color : ul
* Line : 45 Level : 1 You have no background-color with your color : li
* Line : 51 Level : 1 You have no background-color with your color : li a
* Line : 75 Level : 1 You have no background-color with your color : #link1
* Line : 84 Level : 1 You have no background-color with your color : #link2
* Line : 93 Level : 1 You have no background-color with your color : #link3
* Line : 101 Level : 1 You have no background-color with your color : #link4
* Line : 109 Level : 1 You have no background-color with your color : h1
* Line : 116 Level : 1 You have no background-color with your color : h2
* Line : 116 Level : 1 Same colors for color and background-color in two contexts #banner and h2
* Line : 116 Level : 1 Same colors for color and background-color in two contexts li a:hover and h2
* Line : 123 Level : 1 Same colors for color and background-color in two contexts #banner and h3
* Line : 123 Level : 1 You have no background-color with your color : h3
* Line : 123 Level : 1 Same colors for color and background-color in two contexts li a:hover and h3

does anyone fill this crap in. probably worth it longterm
  Reply With Quote
Old 09-07-2003, 10:41   #2 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,625
They're bollocks. Ignore them - anything serious is picked up as an error rather than a warning.
  Reply With Quote
Old 09-07-2003, 10:45   #3 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
i think i might do it for the hell of it
  Reply With Quote
Old 09-07-2003, 10:48   #4 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,211
i'd like to say that i did but i don't.
  Reply With Quote
Old 09-07-2003, 10:51   #5 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,625
It's up to you (it's your site), but I wouldn't advise it. It'll just bulk up your stylesheet.

Remember it's automated - it picks up elements without background colours, for example, when they don't need one.

"Line : 2 Level : 1 You have no color with your background-color : body"
This first one is because you have shorthand css. You used background: #colour, but it looked for background-color:#colour.

As I said: bollocks.


This is the important bit:

Congratulations!
This document validates as CSS!
  Reply With Quote
Old 09-07-2003, 10:52   #6 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
ah i see (peent drops) bugger it

its sunny outside and the barlady is looking good
  Reply With Quote
Old 09-07-2003, 11:31   #7 (permalink)
dan
Iris Folder
 
dan's Avatar
 
Join Date: Apr 2003
Location: smokey
Posts: 2,672
so long as she ain't in rainbow pvc...
  Reply With Quote
Old 09-07-2003, 11:43   #8 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
ha ha
  Reply With Quote
Old 10-07-2003, 03:54   #9 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,874
background-color: transparent;

and everyone's happy
  Reply With Quote
Old 10-07-2003, 04:22   #10 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
is that right bill - for all elements - yes
  Reply With Quote
Old 10-07-2003, 04:39   #11 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,625
No.

Bill, are you suggesting that we all have

background:#fff;
background-color:transparent;

in our stylesheets just to appease an automated validation thing that gets confused?
  Reply With Quote
Old 10-07-2003, 05:11   #12 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
i am not changing them anyway -for now
  Reply With Quote
Old 15-07-2003, 18:40   #13 (permalink)
tmtdesigns
Registered User
 
Join Date: Jul 2003
Location: Scotland
Posts: 2
Send a message via ICQ to tmtdesigns Send a message via AIM to tmtdesigns
i dont bother about it, no point generating more code when it aint really that importtant.

Liam
  Reply With Quote
Old 20-07-2003, 15:35   #14 (permalink)
Prole
Right turn, Clyde
 
Prole's Avatar
 
Join Date: Mar 2003
Posts: 377
i've yet to see a site display incorrectly that doesn't have that stuff so i don't bother with it anymore. it just annoys the fook outta me now!
__________________
everything was great til i got here
  Reply With Quote
Old 20-07-2003, 17:28   #15 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,874
Quote:
Originally posted by Stickman
No.

Bill, are you suggesting that we all have

background:#fff;
background-color:transparent;

in our stylesheets just to appease an automated validation thing that gets confused?


Firstly, if you already have background#fff then the validator won't be warning about absent backgrounds, so there's no need to repeat the declaration in the verbose form.
(I just used the verbose form in the example to be clear what I was getting at and to avoid overriding any background-image attributes that may be set in those declaration blocks.
The shorthand background: ...; attribute will override/clear all verbose background attributes that precede it, even if the values in the verbose attributes are not mentioned in the shorthand attribute. Clear as mud. )


Secondly, as long as I have already implemented a background (colour) for the body, then I don't always bother to clean up warnings (unless there's just one or two).
It's usually only a matter of pasting the line into a few paces in the css and the css validates warning free.
Filesize isn't really a concern as correcting something like Mike's original example would only add an extra 100-300 bytes to the css file, depending on how you did it.

Once the body background (colour) is set then the background/foreground colour behaviours become much more predictable in untested situations.
However, you'd be surprised to see just how many web-developers/designers still forget to set their body background.
Try changing your browser default background to a non-white colour and browse around for a bit and you'll see what I mean.

--

Of course, there's always the asterisk selector to fall back on.

It won't get rid of the validation warnings, but it will go a a fair way to addressing the usability concerns that the validator warnings are reminding you about.
(It is likely, as the validator becomes more intelligent, that the presence of the asterisk selector will be accounted for when assessing whether or not warnings should be given.)
  Reply With Quote
Old 21-07-2003, 04:32   #16 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,263
i agree

it wouldn't ake me long to change them. and i will for the final version

i suppose it does help more whne you are using other style sheets to allow the user to change apperance of your page - it does give you alot more options
  Reply With Quote
Old 21-07-2003, 04:36   #17 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,625
Quote:
Originally posted by Bill Posters
Firstly, if you already have background#fff then the validator won't be warning about absent backgrounds

The stylesheet for gds began:
"body {
background: #1E2D3B;..."

The validator said:
"* Line : 2 Level : 1 You have no color with your background-color : body"

Ten days to come up with this and I still don't follow you.
  Reply With Quote
Old 21-07-2003, 04:46   #18 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,874
The validation warning states that there is no (foreground) color to accompany the declared background (color).

Quote:
Originally posted by Stickman
Code:
background:#fff; background-color:transparent;
Your example simply reiterated the background-colour attribute which does nothing to address the validators warnings about the lack of a specified 'foreground' color.

Either you're getting a little mixed up or you're not making your point very clear.

I am aware that my first post here will not resolve all of the warnings in Mike's post, but I assumed people here would be able to carry the idea through and implement the correct form for each of the warnings.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8