Solved

Easy Style tag question

Posted on 2001-06-26
5
184 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

Technology Partners: 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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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