This is a read-only archive!

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 @ 3:27 PM PDT
Cateogory: Programming

3 Comments

Reinmar
Quoth Reinmar on September 11, 2006 @ 5:26 AM 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 @ 5:31 AM 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 @ 6:02 AM PDT

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