Reply to Re: css: how much / little to use?

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация