Breitenproblem IE vs. FF
Manolo
- css
Hallo,
möchte zwei gefloatete DIVs mittig haben,
bekomme das aber scheinbar wegens des Boxproblems nicht hin.
Gibt es dafür einen Turnaround?
<html>
<head>
</head>
<body style='margin:0; text-align:center;'>
<div style='border:9px solid #000;'>
<div style='border:6px solid #f00;'>
<div style='margin:0 auto; border:3px solid #0ff; width:312px;'>
<div style='float:left; display:inline; margin:0; border:3px solid #0f0; width:150px;'>
container 1
</div>
<div style='float:left; margin:0; border:3px solid #0f0; width:150px;'>
container 2
</div>
<span style='clear:both;'> </span>
</div>
</div>
</div>
</body>
</html>
Danke Euch für evtl. Tips
Mano
Nachtrag:
Es geht um die unterschiedliche Breite zwischen IER und FF
Naja da gibts die gängigen Methoden/Hacks die jeder kennt. Eine neue von mir favorisierte Methode sind die CSS - Angaben:
-moz-box-sizing: border-box;
box-sizing: border-box;
Das ist zwar nicht die schönste Lsg., weil man dort vom W3C - Boxmodell Abstand nimmt, ist aber die einfachste Methode ohne viel Auswand zu betreiben. Mit den Angaben, sagst du dem Browser er soll das Box-Modell des IE anwenden.
Grüße zippy
Yerf!
Das ist zwar nicht die schönste Lsg., weil man dort vom W3C - Boxmodell Abstand nimmt, ist aber die einfachste Methode ohne viel Auswand zu betreiben. Mit den Angaben, sagst du dem Browser er soll das Box-Modell des IE anwenden.
Wenn man auf IEs älter als Version 6 verzichten kann, gibt es auch noch den umgekehrten Weg: mittels Doctype den IE aus dem Quirks-Modus herausholen, dann kann er auch das "richtige" Box-Modell.
Gruß,
Harlequin