Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dark background, white text, accessibility problem 1

Status
Not open for further replies.

harrymossman

Technical User
Sep 5, 2002
255
US
We would like to have white text on a dark background image.

The text color is defined in the style sheet. My understanding is that, according to accessiblity standards, the web page should be readable without the syle sheet. That would result in black text on a dark image. So, how do people deal with this? It must be a common issue. I'm still kind of new to css.

Harry
 
CSS is the standard in every browser these days. And CSS that simple should be compatible with most every browser in the market today. If a browser does not support CSS these days it is out of the standard and hence does not really need to be accounted for when designing as it is a very small portion of the web users.

In any case, you could check for certain older browsers that might not support CSS.

The compatibility issues come along when you use complex CSS that might render differently in different browsers but white text is not one of those.

It could even be accomplished without CSS and would render exactly the same in all browsers.





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Sorry it got submitted by mistake.

If you really want to account for browsers that don't support CSS.

Place your Black background via CSS also

Then if a browser does not support CSS at all, the page will render with a white (default) background (not your dark image) and black(also default) text so as to be readable.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Another, much more compatable way is to set the type color and a default background color (dark in this case) in CSS. This will degrade nicely even if images are disabled and css is enabled.
If images are enabled, the image replaces the background color.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top