|
Posted by Beauregard T. Shagnasty on 08/11/05 19:29
yari.mcgauley@gmail.com wrote:
> I have a pretty simple stylesheet, but I'm always looking to
> minimise it. My question is, once you have declared a font
> property, how often should you use it again?
>
> i.e. I declare: body { font-family: Verdana; font-size: 10px;
> color: #865078; }
>
> so, do I need to keep declaring every heading, footer etc as
> 'Verdana, 10px', or can I get rid of them.
No, you only need to set it when another element would require
something different. The C of CSS is Cascade. Set your base font on
the <body> element.
> Obviously it would be great to use as little code as possible, but
> will all browsers view this ok?
Yes ... except your choice is poor. You've selected Verdana, an overly
large font, so you make it 10px to make it smaller. There is no
Verdana on my computer, so I see little flyspecks and can't read a thing.
And, users of IE will not be able to resize it. (Oft-discussed topic)
Set it font-size: 100%;
and either assign no font, or something reasonable in size.
--
-bts
-This space intentionally left blank.
Navigation:
[Reply to this message]
|