Tuesday, July 18, 2006

Detecting IE7

With the release of Internet Explorer 7, I have been doing a lot of testing to ensure that all my sites will look as thy should in this new browser. I downloaded the beta version, which by the way I find very user friendly and way more stable than any other previous IE versions.

I found out that some of my styles and absolute positions weren't working as previously intended. During my research, I founded very hard to find an easy way of detecting the newly release browser, especially in a manner to which I wouldn't have to revisit as the beta becomes the standard.

I finally found a way via Microsoft's MSDN,it is done using something that has been in place for a long while now, but I just never need to use this. It is called conditional comments. Here is the usage:

< !--[if lte IE 6] >
code here for browsers equal to or previous to IE6
<![endif]-->
<!--[if gt IE 6]>
code here for browsers after IE6
<![endif]-->
<![if !gte IE 6] >
code here for browsers other than IE
<![endif] >

There are a multitude of other options that you can view and explore by visiting Microsoft's Web site.

The bottom line is that you are not alone out there. If you find yourself stuck in a small issue, don't drown in that glass of water,turn to the Web and the answer is soon to come up by simply doing a little research and a lot of testing.
Digg This Del.icio.us Slashdot

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home