Solved

Easy Style tag question

Posted on 2001-06-26
5
178 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Great comments again from everyone thanks.
0
 

Expert Comment

by:Nostradom
Comment Utility
Ok webwoman, i give up ;)

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now