CSS: set font weight depending on fallback font
Posted
by mikez302
on Stack Overflow
See other posts from Stack Overflow
or by mikez302
Published on 2010-04-15T17:49:09Z
Indexed on
2010/04/15
17:53 UTC
Read the original article
Hit count: 227
I am trying to set the font-weight for an element based on the font that gets chosen. For example, I may be trying to do something like this:
h1 {
font-family: Arial Narrow, Impact, sans-serif;
font-weight: ?;
}
Let's say I want the font-weight to be "bold" if the user has Arial Narrow installed on their system, but "normal" if the browser has to use Impact, and maybe "bold" if the user's system has neither of those fonts. Is this possible? If so, how would I go about doing this?
© Stack Overflow or respective owner