<spanclass="tomenu"><ahref="#navigation">↓ Menu ↓</a></span>
<spanclass="flush"></span>
</div>
</div>
<divid="titre">
<h1>Une CSS pour IE seulement</h1>
</div>
<divclass="flush"></div>
<divid="afterheader"class="article">
<divclass="corps">
<p>Pour les développeur de site web Internet Explorer est un cauchemar. C’est pourquoi j’utilise un style complètement différent pour ce navigateur. Avec la librairie jQuery.</p>
<div>
<codeclass="javascript"><spanclass="math inline">$(document).ready( function() { if ($</span>.browser[“msie”]) { // include the ie.js file $(‘head’).append(’
<p><codeclass="javascript"file="ie.js"> // Remove all CSS I don’t want to use on IE $(‘link[rel=stylesheet]’).each(function(i) { if (this.getAttribute(‘href’) == ‘/css/layout.css’) this.disabled = true; if (this.getAttribute(‘href’) == ‘/css/shadows.css’) this.disabled = true; if (this.getAttribute(‘href’) == ‘/css/gen.css’)<br/>
this.disabled = true; }) ;</p>
<p>// Append the CSS for IE only $(‘head’).append(‘<linkrel="stylesheet"type="text/css"href="/css/ie.css"/>’);</p>
// I also add a message on top of the page $(‘body’).prepend(’
<divid="iemessage">
<p>
<spanclass="fr"><em>Avec <ahref="http://www.firefox.com"> Firefox </a> et <ahref="http://www.apple.com/safari">Safari</a> cette page est bien plus jolie !</em></span><spanclass="en"><em>This page is far nicer with <ahref="http://www.firefox.com"> Firefox </a> and <ahref="http://www.apple.com/safari">Safari</a>!</em></span>