Forum Moderators: open

Message Too Old, No Replies

Conditional Comments for IE/Macintosh

         

DrDoc

5:19 pm on Jan 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need to get this clarified once and for all: Do conditional comments work or do anything on IE/Mac? I have always assumed they do, since they are conditional comments for IE. But do they really? For example, what does this do on IE/Mac:

<html>
<body>
<!--[if IE]>
<p>I am IE</p>
<[endif]-->
</body>
</html>

chambone

9:46 pm on Jan 9, 2004 (gmt 0)

10+ Year Member



A blank page.

DrDoc

10:16 pm on Jan 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Darn it :(
Thanks though ;)


Hmm, SuzyUK just pointed out that there was an error in that IE conditional I posted. This is what it's supposed to look like:

<html>
<body>
<!--[if IE]>
<p>I am IE</p>
<![endif]-->
</body>
</html>

Still a blank page?

jimbo_mac

10:34 pm on Jan 9, 2004 (gmt 0)

10+ Year Member



yep, still a blank page

chambone

10:40 pm on Jan 9, 2004 (gmt 0)

10+ Year Member



Yep, still a blank page.

DrDoc

10:46 pm on Jan 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks!

DrDoc

4:46 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Related discussion in the CSS forum:
[webmasterworld.com...]

txbakers

5:02 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I used to use this javascript a while back, but I think it's obsolete now:

var isIE = ( (navigator.appName == "Microsoft Internet Explorer"))? true:false;

Then, throughout the page I would

<script>if(isIE){document.write()}</script>

etc.

Worked for quite a while, but now with the newer browsers I don't even check anymore.

DrDoc

5:24 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem for me is that I need to target IE/Mac with some specific CSS to compensate for some of its quirks, while utilizing its much better CSS engine than it's Windows cousin.

encyclo

11:54 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem for me is that I need to target IE/Mac with some specific CSS to compensate for some of its quirks, while utilizing its much better CSS engine than it's Windows cousin.

Have you tried this hack?:

[sam-i-am.com...]

It looks as if it fits the bill...

DrDoc

12:31 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...unless you want to hide an @import rule (or anything else) from all browsers but IE/Mac.
Validation is a must too...

However, I found a solution that double-hides from all browsers but IE/Mac :)
[webmasterworld.com...]