|
|||
IE7 Problem margin wird ignioriert
Ich baue gerade eine neue Seite, diesmal möchte ich keine Tabellen verwenden.
Nun, denn der Firefox, Opera und der IE6 machen dass, was ich gerne hätte nur der IE7 will nicht.... liveauction.ch Das Problem ist die dunkle Box (<div id="content">)mit dem Inhalt, im IE7 klebt diese am oberen Rand anstelle der 30px Abstand. Hat mir jemand einen Tip woran das liegen könnte ? mein css: Code:
html { background-image: url(/images/verlauf.gif); background-repeat: repeat-y; background-color: rgb(136,162,148); margin: 0px; padding: 0px; } body { font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; margin: 0px; padding: 0px; color: white; } H1 { margin: 0px; margin-bottom: 4px; padding: 3px; font-size: 13px; } img { border: 0px; margin-top: 3px; margin-bottom: 3px; } #head { overflow:hidden; width: 100%; height: 70px; border-bottom: 1px solid white; } #logo { float: left; padding-top: 30px; padding-left: 10px; } #date { padding-top: 46px; padding-right: 10px; float: right; } #nav { clear: both; position: absolute; left: 0px; width: 150px; margin: 30px 15px 10px 15px; padding: 0px; } #nav ul { margin: 0px; padding: 0px; list-style-type: none; } #nav li { border-top: solid 1px white; border-right: solid 1px white; border-bottom: solid 1px rgb(77,73,72); border-left: solid 1px rgb(77,73,72); } #nav A, #nav A:LINK, #nav A:ACTIVE, #nav A:VISITED { padding: 3px; display: block; background-color: rgb(75,102,86); color: white; text-decoration: none; } #nav A:HOVER { padding: 3px; display: block; background-color: rgb(120,138,133); color: rgb(31,26,23); text-decoration: none; } #content { margin: 30px 10px 10px 180px; padding: 10px; overflow: auto; background-color: rgb(56,42,49); border-top: solid 1px rgb(77,73,72); border-right: solid 1px rgb(77,73,72); border-bottom: solid 1px white; border-left: solid 1px white; } #foot { clear: both; float: left; margin-left: 180px; padding: 0px; //ev. fix für spezial IE bug, mal testen im ie6 display: inline; } /* start nur für den IE \*/ * html #foot { margin-left: 90px; } /* end nur für den IE */ #copy { float: right; margin-right: 10px; margin-bottom: 10px; font-size: 10px; padding: 0px; } #valid { clear: both; border-top: dotted 1px red; text-align: center; } A { color: white; text-decoration:none; } A:LINK, A:ACTIVE, A:VISITED { color: white; text-decoration: none; } A:HOVER { color: rgb(31,26,23); text-decoration:none; } Daniel |
Sponsored Links |
|
|||
Ich weiss nicht weshalb, aber ein zusätzliches <span style="clear:both"></span> nach dem div head hat das Problem gelöst, der IE scheint das clear des div nav zu ignorieren.
würde mich über eine Erklärungen freuen... Gruss Daniel |
|
|||
Die Links im FAQ-Thread, Punkt 2, erklären das Verhalten von float und clear und wie der IE das falsch macht.
|
|
|||
Das clear in #nav ist wirkungslos weil absolut positioniert.
Das clear des span ist auch wirkungslos, da nur Blockelemente clear-Funktion haben können. Was der IE7 mit dem span macht, weiß ... der Geier. Ändert sich im IE7 was, wenn du dem #head einen unteren margin gibst (statt den nachfolgenden Elementen einen oberen)? |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Problem mit overflow, Navigation verschoben... | buemplizer | CSS | 9 | 09.09.2009 10:43 |
IE7 Problem | TanjaP. | CSS | 6 | 27.07.2009 22:48 |
Problem mit Navigation im IE7 | onkel-tom | CSS | 5 | 19.06.2009 15:00 |
IE7 fixing - expandable menu | matsie | CSS | 6 | 10.04.2008 16:55 |
Problem mit Drop-Down-Navigation und Bildern im IE7 | bbcda | (X)HTML | 1 | 06.09.2007 10:03 |