Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.

CSS Darstellungsproblem IE - Navigation mit <ul>

Ajax, Hijax, Microformats, RDF, Markup, HTML, PHP, CSS, MySQL, htaccess, robots.txt, CGI, Java, Javascript usw.
Neues Thema Antworten
imothop
PostRank 3
PostRank 3
Beiträge: 86
Registriert: 11.03.2004, 16:53
Wohnort: NRW

Beitrag von imothop » 23.07.2006, 17:47

Hi Zusammen,

ich bin mal wieder den Tränen nah, weil mich der IE in den Wahnsinn treibt. Kaum hat man ein Darstellungsproblem gelöst, kommt schon das nächste und hier ist mein Aktuelles.

Ich möchte ein ganz normale vertikale Navigationsleiste mit CSS erstellen, auf Basis der Listenfunktion UL und LI, mit Hover und Button Effekt.

Im Firefox klappt die Darstellung wunderbar, nur im IE gibt es ein Problem, sobald ich eine Überschrift mit H2 in die Navi einbette. Der IE zeigt mir dann beim ersten Listeneintrag unter der Überschrift einen Pixelabstand an und ich habe keine Ahnung, wo der herkommt.

Ich füge mal 2 Bilder ein, damit man sehen kann, wo genau das Problem liegt.

Das erste Bild zeigt den ganz normalen Hovereffekt und auch im IE werden die Abstände zwischen den Listeneinträgen richtig angezeigt.

Bild entfernt

Das zweite Bild zeigt das Problem und zwar den Pixelabstand zwischen der Überschrift und dem ersten Listeneintrag.

Bild entfernt

Das problm tritt nur im IE auf, im Firefox ist der Pixelabstand nicht vorhanden.

Ich suche nun schon seit einer Stunde nach dem Fehler und kann ihn einfach nicht finden. Ich poste jetzt einfach mal den entsprechenden CSS Code, vielleicht kann ja jemand von euch auf den ersten Blick den fehler entdecken, ich sehe mittlerweile echt nüscht mehr :D

Code: Alles auswählen

ul#Navigation &#123;
    width&#58; 150px;
    margin-top&#58; 0px;
    margin-bottom&#58; 0px;
    margin-left&#58; 0px;
    margin-right&#58; 0px; 
    padding-top&#58; 0px;
    padding-bottom&#58; 0px;
    padding-left&#58; 0px;
    padding-right&#58; 0px;
    border-width&#58; 1px 1px 0px 1px;
    border-style&#58; solid;
    border-color&#58; #36901E;
    background-color&#58; #FFFFFF;
  &#125;
  
  /* star html hack fuer IE */        
  * html ul#Navigation &#123;  /* Korrekturen fuer IE 5.x */
    width&#58; 152px;
   &#125;
  
  ul#Navigation li &#123;
    list-style&#58; none;
    margin-top&#58; 0px;
    margin-bottom&#58; 0px;
    margin-left&#58; 0px;
    margin-right&#58; 0px;
    padding-top&#58; 0px;
    padding-bottom&#58; 0px;
    padding-left&#58; 0px;
    padding-right&#58; 0px;
  &#125;

  ul#Navigation a &#123;
    display&#58;block;
    padding-left&#58; 8px; 
    padding-top&#58; 3px; 
    padding-bottom&#58; 3px; 
    text-decoration&#58; none; font-weight&#58; bold;
    border-width&#58; 0px 0px 1px 0px;
    border-style&#58; solid;
    border-color&#58; #36901E;
    color&#58; #000000; background-color&#58; #FFFFFF;
  &#125;
  
    /* star html hack fuer IE */  
  * html ul#Navigation a &#123;  /* Breitenangaben nur fuer IE */
    width&#58; 150px;
  &#125;
  
  ul#Navigation a&#58;hover &#123;
    background&#58; #ABD69B; 
    color&#58; #FFFFFF;
    font-weight&#58; bold;
    margin-top&#58; 0px;
  &#125; 
  
      /* star html hack fuer IE */  
  * html ul#Navigation a&#58;hover &#123;  /* Breitenangaben nur fuer IE */
    width&#58; 150px;
  &#125;
    
ul#Navigation h2 &#123;
    font-size&#58; 13px;
    color&#58; #FFFFFF;
    font-weight&#58; bold;
    font-family&#58; Arial, Helvetica, sans-serif; 
    text-align&#58; right;
    border-width&#58; 0px 0px 0px 0px;
    background-color&#58; #36901E;
    display&#58;block;
    padding-top&#58; 3px;
    padding-bottom&#58; 3px;
    padding-right&#58; 10px;
    margin-top&#58; 0px;
    margin-bottom&#58; 0px;
    margin-left&#58; 0px;
    margin-right&#58; 0px;
  &#125;

      /* star html hack fuer IE */    
* html ul#Navigation h2 &#123;  /* Breitenangaben nur fuer IE */
    width&#58; 150px;
  &#125;  
Ich sag schonmal tausend Dank an alle, die mal einen Blick drauf werfen.
Zuletzt geändert von imothop am 23.07.2006, 19:37, insgesamt 1-mal geändert.