IE-b0rker returns

Now complete with large annoying red border. Here's a screenshot of Opera pretending to be IE.

I'm using this code to detect IE browsers:

<?php if(strstr($_SERVER['HTTP_USER_AGENT'],"MSIE")) { ?>

If anyone knows a better way, I'd love to hear it.

June 05, 2006 @ 10:27 PM PDT
Cateogory: Programming

3 Comments

Reinmar
Quoth Reinmar on September 11, 2006 @ 12:26 PM PDT

If you want the red border to be displayed only in IE use conditional comments (http://www.quirksmode.org/css/condcom.html). For example in the stylesheet for all user agents there may be line:

#redframe {display:none}

And in the stylesheet included like this:

<!--[if IE]&gt;-->

You may put line:

#redframe {display:block}
Reinmar
Quoth Reinmar on September 11, 2006 @ 12:31 PM PDT

... Your wordpress delete my code ;p It must look like this:

<!--[if IE 6]>
<link rel="stylesheet" src="ss_for_ie_only.css" />
<![endif]-->

Maybe now it will work ;)

Brian
Quoth Brian on September 11, 2006 @ 1:02 PM PDT

IE-specific code makes me cry. But that looks useful if I ever want to mangle a page in IE again, thanks. :)

Speak your Mind

You can use Markdown in your comment.
Email/URL are optional. Email is only used for Gravatar.

Preview