Solved

Easy Style tag question

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AJAX Wordpress Not Reading Variable 2 55
GET error with Font Awesome 3 28
Send form to asp server side 6 26
How to escape unsafe HTML tags 4 36
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

680 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