Hallo,
Sind multiple Klassen für ein Element nicht im IE u.U. problematisch?
(Ich hab da was im Gedächtnis, dass er bei gleicher Spezifität nur eine davon berücksichtigt.)
Hm, aber eigentlich nur, wenn der Selector _ein_ Element mit mehreren Klassen (also .foo.bar) oder _ein_ Element mit ID und Klasse (also .foo#bar oder #foo.bar) matchen soll _und_ wenn es dann auch noch _unterschiedliche_ CSS-Angaben für z.B. .foo.bar und .foo.blubb gibt. Siehe http://forum.de.selfhtml.org/archiv/2006/6/t131477/#m850501.
Folgendes mini-Testszenario läuft jedenfalls:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Titel</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<!--[if IE]>
<style type="text/css">
.Col1Hidden #colBox1 { display:none; }
.Col2Hidden #colBox2 { display:none; }
.Col3Hidden #colBox3 { display:none; }
</style>
<![endif]-->
<!--[if !IE]>-->
<style type="text/css">
.Col1Hidden #colBox1 { visibility:collapse; }
.Col2Hidden #colBox2 { visibility:collapse; }
.Col3Hidden #colBox3 { visibility:collapse; }
</style>
<!--<![endif]-->
<script type="text/javascript">
<!--
function collapse(nr) {
var myDiv = document.getElementById("myDiv");
myDiv.className += " Col" + nr + "Hidden";
alert(myDiv.className);
}
//-->
</script>
</head>
<body>
<div id="myDiv" class="Col0Hidden Col4Hidden">
<div id="regalContainer" class="Aufbaualternative0">
<table border="1">
<col id ="colBox1" class="ColBoxFooBar">
<col id ="colBox2" class="ColBoxFooBar">
<col id ="colBox3" class="ColBoxFooBar">
<tr>
<td>Zelle 1 1</td>
<td>Zelle 1 2</td>
<td>Zelle 1 3</td>
</tr>
<tr>
<td>Zelle 2 1</td>
<td>Zelle 2 2</td>
<td>Zelle 2 3</td>
</tr>
</table>
</div>
</div>
<button onclick="collapse(1);">collapse(1)</button>
<button onclick="collapse(2);">collapse(2)</button>
<button onclick="collapse(3);">collapse(3)</button>
</body>
</html>
Gunnar, eventuell bastelst Du ja hier mal weiter ;-):
viele Grüße
Axel