143 lines
6.9 KiB
HTML
143 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>YBlog - Une CSS pour IE seulement</title>
|
||
<meta name="keywords" content="web, webdesign, jQuery" />
|
||
|
||
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
|
||
<link rel="stylesheet" type="text/css" href="../../../../css/y.css" />
|
||
<link rel="stylesheet" type="text/css" href="/css/legacy.css" />
|
||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
|
||
<!--[if lt IE 9]>
|
||
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
|
||
<![endif]-->
|
||
<!-- IndieAuth -->
|
||
<link href="https://twitter.com/yogsototh" rel="me">
|
||
<link href="https://github.com/yogsototh" rel="me">
|
||
<link href="mailto:yann.esposito@gmail.com" rel="me">
|
||
<link rel="pgpkey" href="../../../../pubkey.txt">
|
||
</head>
|
||
<body lang="fr" class="article">
|
||
<div id="content">
|
||
<div id="header">
|
||
<div id="choix">
|
||
<span id="choixlang">
|
||
<a href="../../../../Scratch/en/blog/2009-10-30-How-to-handle-evil-IE/">Anglais</a>
|
||
</span>
|
||
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
|
||
<span class="flush"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="titre">
|
||
<h1>Une CSS pour IE seulement</h1>
|
||
|
||
</div>
|
||
<div class="flush"></div>
|
||
<div id="afterheader" class="article">
|
||
<div class="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>
|
||
<code class="javascript"> <span class="math inline">$(document).ready( function() { if ($</span>.browser[“msie”]) { // include the ie.js file $(‘head’).append(’
|
||
<script type="text/javascript" src="../../../../js/ie.js">
|
||
</scr’ + ‘ipt>’); } }); </code>
|
||
</div>
|
||
<div>
|
||
<p><code class="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(‘<link rel="stylesheet" type="text/css" href="/css/ie.css"/>’);</p>
|
||
// I also add a message on top of the page $(‘body’).prepend(’
|
||
<div id="iemessage">
|
||
<p>
|
||
<span class="fr"><em>Avec <a href="http://www.firefox.com"> Firefox </a> et <a href="http://www.apple.com/safari">Safari</a> cette page est bien plus jolie !</em></span><span class="en"><em>This page is far nicer with <a href="http://www.firefox.com"> Firefox </a> and <a href="http://www.apple.com/safari">Safari</a>!</em></span>
|
||
</p>
|
||
.
|
||
</div>
|
||
<p>’);</p>
|
||
</code>
|
||
</div>
|
||
<p>Voilà.</p>
|
||
</div>
|
||
<div id="afterarticle">
|
||
<div id="social">
|
||
<a href="/rss.xml"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
class="social">RSS</a>
|
||
·
|
||
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/fr/blog/2009-10-30-How-to-handle-evil-IE/%20via%20@yogsototh"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
class="social">Tweet</a>
|
||
·
|
||
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/fr/blog/2009-10-30-How-to-handle-evil-IE/"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
class="social">FB</a>
|
||
<br/>
|
||
<a class="message" href="/Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
|
||
</div>
|
||
<div id="navigation">
|
||
<a href="/">Accueil</a>
|
||
<span class="sep">¦</span>
|
||
<a href="/Scratch/fr/blog">Blog</a>
|
||
<span class="sep">¦</span>
|
||
<a href="/Scratch/fr/softwares">Logiciels</a>
|
||
<span class="sep">¦</span>
|
||
<a href="/Scratch/fr/about">Auteur</a>
|
||
</div>
|
||
<div id="totop"><a href="#header">↑ Top ↑</a></div>
|
||
<div id="bottom">
|
||
<div>
|
||
Published on 2009-10-30
|
||
</div>
|
||
<div>
|
||
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
|
||
</div>
|
||
<div>
|
||
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
|
||
</div>
|
||
|
||
<div>
|
||
Done with
|
||
<a href="http://www.vim.org"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
><strike>Vim</strike></a>
|
||
<a href="http://spacemacs.org"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
>spacemacs</a>
|
||
<span class="pala">&</span>
|
||
<a href="http://nanoc.ws"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
><strike>nanoc</strike></a>
|
||
<a href="http://jaspervdj.be/hakyll"
|
||
target="_blank" rel="noopener noreferrer nofollow"
|
||
>Hakyll</a>
|
||
</div>
|
||
<hr/>
|
||
<div style="max-width: 100%">
|
||
<a href="https://cardanohub.org">
|
||
<img src="/Scratch/img/ada-logo.png"
|
||
class="simple"
|
||
style="height: 16px;
|
||
border-radius: 50%;
|
||
vertical-align:middle;
|
||
display:inline-block;"/>
|
||
ADA:
|
||
</a>
|
||
<code style="display:inline-block;
|
||
word-wrap:break-word;
|
||
text-align: left;
|
||
vertical-align: top;
|
||
max-width: 85%;">
|
||
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
|
||
</code>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|