Solved

Easy Style tag question

Posted on 2001-06-26
5
185 Views
Last Modified: 2013-12-03
If this is put in a web page :
BODY { font-family: somefont } and the user's system does not have a somefont font, what will the browser display, assuming that this selector is at the top of the hierachy?
0
Comment
Question by:panrob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Accepted Solution

by:
CF_Spike earned 50 total points
ID: 6229614
The user's browser will display the default font for that browser. You can however, use a list of fonts to try to catch all possiblities. The first font in the list will be tried first, then the second and so on. If you wanted to use Arial, you could do something like this to give the maximum coverage for your users:

Style="font-family: Arial, Helvetica, sans-serif"

Always put the most generic font at the right hand side of the list.

There is no limit to the number of fonts you can use, but 3 or 4 well chosen ones are normally sufficient.

More information is available here:
http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop

Spike
0
 

Expert Comment

by:Nostradom
ID: 6230631
If you want to be sure that the user has the font you use, type like CF_Spike described. I just wanted to add that PC-users 'always' have Arial, Verdana and Mac users 'always' have Helvetica, Verdana. Verdana is therefore a very popular font.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6231207
Mac users won't 'always' have Verdana. It's one of the fonts MS apps install, and there are lots of Mac users that don't have any MS apps -- I know many designers who use older systems and don't have IE, or much of ANYTHING MS -- and if they use Word, it's 5.0, which didn't load any extra fonts, if I remember correctly. And on top of that, there are lots and lots of Mac users that trash any fonts that MS installs, or turn them off in ATM/Suitcase/FontReserve/whatever font utility they use.

Mac users WILL have Geneva -- they have to, it's a system font. Mac system fonts are normally Geneva, Chicago, Monaco, New York. No matter how old or crappy the Mac, or what OS version they use, they'll have those fonts.

But they won't necessarily have Verdana... ;-)
0
 

Author Comment

by:panrob
ID: 6231322
Great comments again from everyone thanks.
0
 

Expert Comment

by:Nostradom
ID: 6234271
Ok webwoman, i give up ;)

But it would be nice if everyone had verdana. I like that font!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question