DelphiFAQ Home Search:
General :: Web publishing
Information about web publishing, how to maintain, optimize and promote a web site.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

My font-weight property in CSS is ignored

Question:

Below is my style definition from my CSS. The font-weight property gets ignored and Firefox reports an error. What is wrong? I tried fontweight and other spellings, also capitalization - with no success.

Answer:

The font-weight property accepts only these values:
  1. normal - normal characters
  2. bold - thick characters
  3. bolder - thicker characters
  4. lighter - lighter characters
  5. 100 - or numbers
  6. 200
  7. 300
  8. 400 - 400 equals normal
  9. 500
  10. 600
  11. 700 - 700 equals bold
  12. 800
  13. 900
You cannot select numbers between these valid values. A number as your chosen 650 will be ignored by Internet Explorer and Firefox will even throw a warning in the Javascript Console.

.MYSTYLE {
 font-weight:    650;  <=== MISTAKE! Either 600 or 700!
 font-family:    Courier New;
 font-size:      12px;
 color:          Blue;
 background-color: White;
 }
 

Generated 20:02:08 on Sep 21, 2017