<h1>Dieser Test ist nur für IE bis Version 8 (oldIE)</h1>
<div>
<h2>Überschrift mit IE-Gradient-Filter und ohne relative Positionierung des Elternelements</h2>
</div>
<div class="halter">
<h2>Überschrift mit IE-Gradient-Filter und mit relativer Positionierung des Elternelements</h2>
</div>
CSS
h1, h2 {
font-family: sans-serif;
padding: 20px 30px;
margin-bottom: 20px;
}
h1 {
font-size: 16px;
color: #000;
}
div {
font-size: 12px;
color: #fff;
background-color: rgba(162,0,0,0.5);
/* Für IE8 und drunter */
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#7FA20000', EndColorStr='#7FA20000');
}
.halter h2 {position: relative;}
div {margin-bottom: 10px;}
/* styling basics */
html {padding: 20px 0; background-color: #efefef;}
body {width: 80%; padding: 40px; margin: 0 auto; background: #fff; box-shadow: 1px 1px 5px rgba(0,0,0,0.5); font-family: Verdana, Arial, sans-serif; font-size: 14px;}
JavaScript
// Danke an @derSchepp für entscheidende Hinweise.
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.