Tag Archive for ie

ie only style sheet

Here is the basic technique for an IE-Only stylesheet:

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

The opposite technique, targeting only NON-IE browsers:

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

If you need to get down and dirty with specific versions of IE, here are a few examples.

IE 7 ONLY:

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

IE 6 ONLY:

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

IE 5 ONLY:

<!--[if IE 5]>
<link rel="stylesheet" type="text/css" href="IE-5-SPECIFIC.css" />
<![endif]-->

IE 5.5 ONLY:

<!--[if IE 5.5000]>
<link rel="stylesheet" type="text/css" href="IE-55-SPECIFIC.css" />
<![endif]-->

VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="IE-6-OR-LOWER-SPECIFIC.css" />
<![endif]-->

source

Filter IE

if ('v'=='v') {}

source

Bug im Internet Explorer 7

//In der Datei t3lib/class.t3lib_div.php diese Zeile

} elseif (strstr($useragent,'MSIE 4') || strstr($useragent,'MSIE 5') || strstr($useragent,'MSIE 6')) {

//durch folgende Zeile ersetzen:

} elseif (strstr($useragent,'MSIE 4') || strstr($useragent,'MSIE 5') || strstr($useragent,'MSIE 6') || strstr($useragent,'MSIE 7')) {

source

Web browser hacks, Css hacks – ie, firefox, chrome, safri, Opera

CSS hacks take advantage of browser bugs for hiding CssRules from specific web browsers. Listed below are the hacks for major browsers like ie6, ie7, firefox2, firefox3, Google chrome, safari and opera...

source

Purge event handlers from a DOM element

Object.protoype.purge = function purge(d) {
var a = d.attributes, i, l, n;
if (a) {
l = a.length;
for (i = 0; i < l; i += 1) {
n = a[i].name;
if (typeof d[n] === 'function') {
d[n] = null;
}
}
}
a = d.childNodes;
if (a) {
l = a.length;
for (i = 0; i < l; i += 1) {
purge(d.childNodes[i]);
}
}
}

source

hide ie image toolbar

<meta http-equiv="imagetoolbar" content="no" />

source

Detecting IE (mini)

IE='v'=='v'

//o var isIE = /*@cc_on!@*/false;

source

A hasLayout fix without side-effects

<!--[if IE]><style>.hasLayout { zoom: 1; }</style><![endif]-->

source

IE button fix

button {
width: auto;
overflow: visible;
}

source

CSS-hacks (IE, FireFox, Opera)

/* for all (IE, FireFox, Opera)*/
.some_class{
width:50%;
background:#FFFCD8;
}
/* FireFox & Opera only */
html>body .some_class{
width:100%;
}
/* FireFox only */
head:first-child+body .some_class{
width:50%;
}

source