![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
I am sure you plonked him a while back. |
#12
| |||
| |||
|
|
Roedy Green <see_webs... (AT) mindprod (DOT) com.invalid> writes: Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? Just apply it to the top-level body rule: body { font: 1em serif } |
#13
| |||
| |||
|
|
Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? Just apply it to the top-level body rule: body { font: 1em serif } The question presumably refers to browser default font family. What makes you think it is a serif font and that it is the font corresponding to the keyword serif? Hint: You have no grounds for that, I think no such thing. |
|
Elements nested in the body element will inherit its styles - that's the C (for Cascade) in CSS. You don't understand the "C" in "CSS". Neither do most other authors, but this is a good reason to refrain from giving advice on CSS in public before you have a clue. You don't understand basic manners. |
|
The correct answer is that the "best" one can do is * { font-family: inherit !important; } but this a) isn't supported by IE b) is ineffective against style sheets that use the !important weapon too. So, your "correct answer" is one that doesn't work for 70-80% of the real users who will visit a site? |
#14
| ||||||||
| ||||||||
|
|
body { font: 1em serif } Thanks for your speedy response. I realise now that I do that already. |
|
Here is a related question, which is the one I should have asked in the first place. |
|
What if you have 3 basic font-family patterns on your website? |
|
e.g. for body text font-family: "Tiresias PCfont Z","Tiresias PCfont",TiresiasScreenfont,"Palatino Linotype","Bookman Old Style","Book Antiqua","Trebuchet MS","Lucida Sans","Lucida Sans Unicode",Verdana,serif; for title-like elements: font-family: Calibri,"Bitstream Vera Sans","Segoe UI",Arial,Helvetica,sans-serif; for monospaced elements: font-family: "Bitstream Vera Sans Mono","Lucida Console","Lucida Sans","Lucida Sans Unicode","Courier","Courier New","Bitstream Vera Sans","Segoe UI",Arial,monospace; |
|
Is there a way to specfy each pattern only once, then just indicate which pattern applies to any given style? |
|
If not, is there a way to specify the preferred font-family set you would like to use for logical fonts monospace , sans-serif and serif? |
|
If not, is there any way to create user-defined inheritance hierarchy |
|
I heard CSS was developing constants/variables, that might be useful to solve such a problem. |
#15
| |||
| |||
|
|
On Aug 2, 1:40*pm, Sherman Pendley <spamt... (AT) dot-app (DOT) org> wrote: Roedy Green <see_webs... (AT) mindprod (DOT) com.invalid> writes: Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? Just apply it to the top-level body rule: body { font: 1em serif } I definitely recommend to *_not_* use 1em and instead use 100% because there is an important bug in IE 5, IE 6 and IE 7 which will be triggered with font: 1em serif. |
![]() |
| Thread Tools | |
| Display Modes | |
| |