Having issues getting my html conditional statements to correctly pull in the IE specific CSS stylesheets. Could somebody please take a look at the top part of my code to see if I have syntax correct?
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Cherokee Cat Clinic</title>
<link rel="stylesheet" type="text/css" href="styles/cherokee.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="styles/ie/cherokee_ie.css" />
<![endif]-->
<!--[if IE 9]>
<link rel="stylesheet" type="text/css" href="styles/ie/cherokee_ie.css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="styles/ie/cherokee_ie.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="styles/ie/cherokee_ie.css" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="styles/ie/cherokee_ie.css" />
<![endif]-->
<style type="text/css">
Also, I am very new to the process of re-building a site for different versions of IE. I have seen Quirks Mode’s attribute table, but is there a good compendium of what CSS selectors are /wonky/ in which versions of IE? Or even a good reference thread for Stack Overflow articles on what to watch out for when designing for IE7 & 8?
the code looks good as far as the if-statements are concerned, but having the xml declaration at the very top keeps IE in quirks mode, so that may cause some of the issue and if not will prove to add some down the road. may want to scratch and see if that’ll help.
regarding building for each version of IE, don’t. grace degradation is the name of the game. for me it plays out like this: IE8 & 9 should show up fine functionally and nearly so design-wise (depends on how many little tricks you pull in your design and code). IE7 should work and not look like a total mess. IE6 can suck it.
if your client specifically requests a browser’s complete compatibility then that’s obviously another matter.
and regarding things to watch out for and easily circumvent in IE you can check out posts like this one to help with keeping an eye out for those common problems: http://css-tricks.com/ie-css-bugs-thatll-get-you-every-time/