From what I gathered and understood here and there (stop me when I’m wrong) :
child selector (>) works on IE7+ as long as you trigger the standards mode with your doctype, html5’s <!DOCTYPE html> is supposed to do this.
Still, my css:
nav > ul > li > a
{
padding: 0.2em 2em 0.2em 2em;
background-color: #FAFAFA;
}
nav > ul > li > a:hover
{
background-color: #AFAFAF;
}
doesn’t seem to reach my html:
<!DOCTYPE html>
...
<body>
<header>
<nav>
<a class="inblock valignC logo" href="/"><img src="static/img/logo.gif" /></a>
<!--Menu nav : LOGO | Agence | Portfolio | Equipe | Clients | Contact-->
<ul class="inblock valignC">
<li class="inline"><a class="ie" href="/agence/">Agence</a></li>
...
</ul>
...
in IE8, I have to use the dedicated .ie class I added on targetted <a>s.
Any explaination ?
You need to use the HTML5 Shiv for IE versions under 9: