DelphiFAQ Home Search:

My font-weight property in CSS is ignored

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

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;
}

Comments:

2008-06-27, 07:49:15
anonymous  
css Font examples , Properties , Attribute - - //
http://www.css-less..amples.htm
2015-02-01, 00:00:23
anonymous from Belgium  
Ah, i see. Well th'ats not too tricky at all!'

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: