Jen Strickland wrote:
Hello!
I've validated my code, and wanted to be tidy and validate my css, so
I tried using http://jigsaw.w3.org/css-validator/
... and it validates, but has warnings. I understand why, but it's so
confusing how all the background-colors need to be accounted for. Is
there some handy-dandy easier way, than to list each and every one
with a background???
Setting color every time you set background-color (and vice versa),
and setting background-color every time you set background-image, is
the only truly robust approach in the face of unpredictable markup and
browser configurations.
Also, make sure when you set :link colors you also set :unvisited too.
You might find this less cumbersome if you generate your CSS with
preprocessed templates, allowing you to define particular colors by name
or function or even group whole declarations.
Simple example using Perl:
http://dorward.me.uk/www/css/inheritance/
Note also that transparent and inherit are valid background-color
values, although the later is poorly supported by Internet Explorer 6.
Good ways to test how such CSS works in practice include:
1. Change your default colors to white text on black.
2. Try one of Opera's High Contrast View options.
3. Try IE and Windows XP in High Contrast mode.
4. Disabling images.
In terms of CSS and accessibility, note that Meyer's reset CSS, which
you're using, unsets the default keyboard focus ring (outline: 0;),
but you have not explicitly set any keyboard focus outline as a
replacement. See
http://www.w3.org/TR/WCAG20/#navigation-mechanisms-focus-visible for Web
Accessibility Initiative's emerging guidance about ensuring keyboard
focus is always visible.
For more on CSS and accessibility issues see:
http://24ways.org/2007/css-for-accessibility
and
http://www.w3.org/TR/WCAG10-CSS-TECHS/
and
http://www.w3.org/TR/WCAG20-TECHS/
Hope that helps.
--
Benjamin Hawkes-Lewis
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/