About impNERD

impNERD is the place to find information on internet marketing, publishing and tips for web development. Read more »

Subscribe

Subscribe to impNERD via RSS
What is RSS?
Subscribe via e-mail:

Using Relative font-size for Accessibility

Although I prefer using ems and percentages, there are select web designers who insist on using pixels for their entire design. There are some advantages to this, such as a controlled layout and knowing that it will look the same in all browsers and computers. However, using pixels can cause accessibility problems for visual impaired. To counter this, we must use another form of font-size properties to allow all browsers to resize font; these font-size properties are called font-size keywords.

How to make font-size pixels resizable

p {
font-size: 12px;
}

/*/*/a{}
body p {
font-size: x-small;
voice-family: "\"}\"";
voice-family: inherit;
font-size: small;
}
html>body p {
font-size: small;
}
/* */

Everything between the /* */ is ignored by Netscape 4. a{} is ignored by Opera 5. Defines body p to be x-small in IE 5, small in others. The voice-family stuff makes IE 5 think body p is over, but no other browser does. html>body p is for Opera 5. All browsers except IE 5 will then set the font-size to small except IE 5 and Netscape 4, which doesn’t support relative font-size.

To make it easier for visitors to change font-size use a style switcher code to place icons on your site so they can easily increase font-size on their own without digging through browser settings.

Add to Del.cio.us RSS Feed Stumble It! Zoom It! Add to Sphinn
    www.sajithmr.com

Rate:
2.8

If you enjoyed this post, please consider subscribing to my full feed RSS.

Written: Dec 6, 2007
Tags: , ,

Related Articles:
How to Make Fonts Look the Same in All Browsers
2007: Year in Review
Absolute vs Relative Internal Linking
Windows XP Font Editor
New Widgets for Blogs


RSS feed

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Sponsors

1993 Honda Civic
Hosting Concept
Make money online
PoemofQuotes Blog