1. Home
  2. Computing & Technology
  3. Web Design / HTML

Why Don't my CSS Colour Styles Work?

By Jennifer Kyrnin, About.com

Question: Why Don't my CSS Colour Styles Work?

If you speak a variant of British English that has spellings like favourite and colour, you may come into trouble when writing CSS.

Answer:

CSS is written with US English spellings. So if you are writing colour:red; in your style sheets, none of your text will change color.

Make sure that when you write CSS color styles you use the US English spelling for them:

color
background-color
border-color
outline-color

More Web Design / HTML Q&A

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Beginning CSS
  6. Why Don't my CSS Colour Styles Work - Spelling Colour in CSS

©2008 About.com, a part of The New York Times Company.

All rights reserved.