IE7 z-index issues

If you have z-index issues, particularly with drop down menus in IE7 this conditional script may help.

<!--[if IE 7]>
	<script type="text/javascript">
			$(function() {
				var zIndexNumber = 1000;
				$('div').each(function() {
					$(this).css('zIndex', zIndexNumber);
					zIndexNumber -= 10;

Conditional CSS for Internet Explorer

To add stylesheets for specfic Internet Explorer versions you can add the blocks of code below to the head section of your HTML code. Make sure the code is placed beneath your main css declarations.

All IE Versions

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-all.css" />


<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6.css" />


<!--[if IE 7]> 
<link rel="stylesheet" type="text/css" href="ie7.css">

You can also use other operators to target various version at the same time:

lt = less than
lte = less than or equal to
gt = greater than
gte = greater than or equal to
! = not equal to
& = AND [if (gt IE 6)&(lt IE 7)]
| = OR [if (IE 6)|(IE 7)]

Less or equal to IE8

<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="ie8-and-down.css" />