Zum Inhalt springen

Menü im IE 9 beim mouse over verschoben

Erstellt am 16. Februar 2012 · 1 Antwort · letzte Antwort am 16. Februar 2012

Tags: HTML & CSS, Frage

zorc68 ·

Hallo,
ich habe ein Problem mit einem Dropdown-Menü, dass sich erstellt habe. In allen Browsern klappt es soweit gut nur im IE 9 ist das Untermenü mein Mouseover nach rechts und nach oben verschoben. Komischer weise aber nicht immer? Hier ist mal der Link zur Seite zum ansehen:
http://p154104.webspaceconfig.de/unternehmen.html
und hier ist das verwandete CSS:

ul.menu, ul.menu ul {
    list-style-type: none;
    margin-left: -37px;
    margin-top: 0px;
}
*html ul.menu, ul.menu ul {
    list-style-type: none;
    padding-left: 41px;
    margin-top: 0px;
}
ul.menu a {
    display: block;
    padding: 0px 15px 0px 0px;
}
ul.menu a:hover {
    display: block;
    padding: 0px 15px 0px 0px;
    color: #cc071e;
}
ul.menu ul a {
  padding: 4px 15px 0px 0px;
  font-weight:bold;
}
ul.menu ul a:hover {
  color: #d2232a;
  font-weight:bold;
  padding: 4px 15px 0px 0px;   
}

ul.menu ul a:active {
  color: #d2232a;
  font-weight:bold;
  padding: 4px 15px 0px 0px;
}
ul.menu li {
    padding:0;
    margin:0;
    background-image: none;
    float:left;
}

ul.menu ul {
    margin-left:0;
    padding: 10 0 5px 0;
    position: absolute;
    display:none;
    min-width:120px;
}
ul.menu ul.hover, ul.menu li.hover ul, ul.menu li:hover ul  {
    display:block;
    outline:expression(this.onFocus=this.blur());
}

ul.menu ul li {
    float:none;
    background-color: transparent;
}

und noch speziell für den IE

*html ul.menu ul {
    width:180px;
    outline:expression(this.onFocus=this.blur());
}
*html ul.menu, ul.menu ul {
    margin-top: 0px;
    outline:expression(this.onFocus=this.blur());
}
*html ul.menu ul a {
    padding: 0px 15px 4px 0px;
  outline:expression(this.onFocus=this.blur());
}
*html ul.menu ul a:hover {
    padding: 0px 15px 4px 0px;
outline:expression(this.onFocus=this.blur());
}
*html ul.menu ul a:active {
    padding: 0px 15px 4px 0px;
    outline:expression(this.onFocus=this.blur());
}

Hat jemand eine Idee worin der Fehler im IE9 liegen könnte oder wie ich Ihn umgehen könnte.
Danke für Eure Hilfe. Marc

Chrissli ·

Also bei mir ist es so:

Firefox - Nach oben versetzt
IE9 Standard - Passt
IE9 Kompatibilitätsansicht - Passt
IE8 Ansicht - Passt
IE7 - Verschoben
Quirksmode - Verschoben

Ich tippe mal auf den Doctype:
Bei dir steht:
<!DOCTYPE html>

Ein richtiger Doctype sieht zum Beispiel so aus:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Wenn du den Doctype aus deinen Templates entfernst, kannst du mit Typoscript den Doctype automatisch setzen lassen:

page.config.doctype = xhtml_trans

( Näheres hierzu findest du in der Typo3-Script Referenz CONFIG

Aber der richtige Doctype hat schon vielen mit "Im IE(7|8|9) sieht alles anders aus"-Problem weitergeholfen