Author Topic

Nathan Kelly

Tuesday 29 November 2005 6:06:15 pm

Comment44812

Hi Caxca, you can use different CSS media types to do what you need, when you link to you CSS you should define a media type for that CSS file, for example:

<style type="text/css" media="screen">
    @import url("stylesheets/screenstyle.css");
</style>

You sound like you want a stylesheet for "screen readers", in that case you could use:

<style type="text/css" media="screen">
    @import url("stylesheets/screenstyle.css");
</style>

<style type="text/css" media="aural">
    @import url("stylesheets/auralstyle.css");
</style>

The screen stylesheet will be used if the site is accessed by a pc (screen media, anything with a monitor) while the aural stylesheet will be used if the site is accessed by a screen reader (if it supports the aural media type, most should).

You can find more info here:
http://www.w3.org/TR/REC-html40/present/styles.html#h-14.2.4
http://www.w3.org/TR/REC-CSS2/media.html#media-types
http://www.w3.org/TR/REC-CSS2/aural.html

<i>I'm not 100% sure what the support is like on most user agents, I think most of the latest screen readers have support for this though.</i>

Hope that helps, Cheers!

Pardon me while I burst into flames...