Previous Message
Next Message

voice family keywords and alternate stylesheets

Sent by Gunlaug_Sørtun on 2 July 2004 13:01


Maren Child wrote:
>Is this hack likely to cause a problem in the future (eg with devices that
>use aural stylesheets, or with new browsers) or will it only affect ie5? I
>know it won't validate because it's using voice-family in a screen
>stylesheet. I just want to know if these documents will be broken 10 years
>from now - that would be bad because they're annual reports. I don't want
to
>use quirks mode for the same reason.

Yes, it probably will cause problems, given that timeframe.
I don't think there's one single hack that won't backfire some day, so try
to get around your problems without using hacks.

As I know it can't be done, this is how I would "comment in" corrections for
IE-win in a safe way:
---
<link rel="stylesheet" href="your-ALL BROWSERS-styles.css" type="text/css"
/>
<!--[if IE]>
<link rel="stylesheet" href="your-IE-WIN-styles.css" type="text/css" />
<![endif]-->
---

This method is safe because it is created by Microsoft as a back door, and
is not relying on browser bugs. It will therefore stay safe for those
versions of IE-win that are out here now, and will not interfere with any
other browser - IE-win or other - that hasn't got this back door built in.
It is open for feeding styles to IE5.0, IE5.5 and IE6 on win, and can
separate them.

It loads a new style sheet for IE-win with the definitions needed to
override any settings that other browsers acts on.
This means that you can set font-sizes in pixels on body - and other
elements - and change those to percentages for IE-win. Thus you can get
those font-sizes as close to what you want in all major browsers at the same
time.

Quirksmode has the details on how to separate different versions of IE5+ on
win, if that's needed.
http://www.quirksmode.org/

I've got a somewhat similar description on how "conditional comments" can be
used, on:
http://www.gunlaug.no/homesite/main_int_moooh.html#item_2

If you also need alternating style sheets to feed something for IE-win only,
you just use the same method for those. By matching style sheet titles and
media attributes, they will be loaded in pairs in IE-win. A few more lines
to paste into the page heads, but if you want it somewhat safe this is the
best I can think of.

Regards
	Georg

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: