A way to hide styles from all browsers but IE5 Mac
A typo in a document I was working on led me to discover this method of serving style sheets to IE5 Mac only. It validates. It also appears to work for IE 4.5 Mac, although the limitations of this are unconfirmed, and the browser now an extreme rarity
The IE Mac sheet is linked like this:
<style type=”text/css”>
@import("ie51.css");
</style>
The essential requirements are to ommit ‘url’ and leave no space between @import and ("
It is red in Mac IE 4.5 through 5.23 on OS9 and OSX
It is presumed the default colour on all other browsers and has actually been tested on:
PC
- IE 5.0
- IE 5.5
- IE 6.0
- Opera 5.12
- Opera 6
- Opera 7
- NN4x
- Netscape 6.2.3
- Mozilla 1.1 & 1.2b
Mac
- Mozilla 1.1
- Opera 5
- NN4.x
- Chimera 0.5
- iCab 2.8.2
- Omniweb 4.1.1
- Safari beta 2
Linux
- Konqueror 3.0.8
Test cases
Two biggest Mac IE 5 CSS Gotchas
1. You MUST declare a width for any floated element
2. If trying to do forms without tables, remove any new lines in the HTML between elements intended to be on the same line in the rendered page. Example:
<div> <span><label for="realname">name</label></span><input name="realname" id="realname" type="text" size="30" maxlength="50" /> </div>
NOT:
<div> <span><label for="realname">name</label></span> <input name="realname" id="realname" type="text" size="30" maxlength="50" /> </div>
any questions please get in touch