David: /CSS: IE-Problem... (Nachtrag)

Beitrag lesen

Probiers mal hiermit:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
    <meta http-equiv="content-style-type" content="text/css" />
    <meta http-equiv="content-script-type" content="text/javascript" />

<title>Test</title>

<style type="text/css" media="screen">
        body {
            margin:0;
            padding:4em 6em;
        }
        .wrapper {
   margin:2em 0;
   /* height:1%; */
        }
        .container {
            /* margin:2em 0; */
            background:#eee;
            border:1px #000 solid;
        }
        h2, p {
            margin:0;/* 1em 2em; */
            padding:0;
        }

.container h2, p {
            margin:0;/* 1em 2em; */
            padding:1em;
        }
    </style>
</head>
<body>
    <div>
        <div id="c1" class="container" onmouseover="this.style.backgroundColor = '#ccc';" onmouseout="this.style.backgroundColor = '#eee';">
            <h2>Event-Handler und IE(6)</h2>
            <p>
                In diesem Beispiel soll sich die Hintergrundfarbe des DIVs .container per
                JavaScript aendern, wenn man ihn mit der Maus ueberfaehrt.
            </p>
            <p>
                Bist Du hiermit zufrieden?
    Gruß
    David
            </p>
        </div>
    </div>
    <div class="wrapper">
        <div id="c2" class="container" onmouseover="this.style.backgroundColor = '#ccc';" onmouseout="this.style.backgroundColor = '#eee';"><!--  -->
            <h2>Event-Handler und IE(6)</h2>
            <p>
                Auch hier soll sich die Hintergrundfarbe des DIVs .container per
                JavaScript aendern, wenn man ihn mit der Maus ueberfaehrt.
            </p>
            <p>
                Lass die Höhe für den Wrapper weg. Dann klappts bei Netscape und IE und Opera.

Gruß
    David
            </p>
        </div>
    </div>
</body>
</html>