franzmann
Goto Top

Ungewollte Lücken-Abstände in der Menüleiste mit IExplorer

Hallo,
ich habe eine Menüleiste erstellt und auch funktioniert.
Diese wird mit Mozilla Firefox richtig dargestellt.
Nur unter MS Internet Explorer bekomme ich zwischen die Menüpunkte automatische Platzlücken.
Kann mir jemand sagen wie ich mein Menü für beide Browser kompatibel bekomme
und gleich aussehen lasse.
Hoffe die Erklärung war einigermaßen hilfreich, anbei der Quellcode:

<html>

<head>
<title>Menuleiste</title>
</head>

<body>

<style type="text/css">   
ul#navigation { 
     width: 12em; 
} 
li { 
  list-style: none; 
  background-color: #ff0000; 
  border-top: solid 1px #E5E5E5; 
  text-align: left; 
  margin: 0; 
} 
li a { 
  display: block; 
  text-decoration: none; 
  padding: .25em; 
  border-bottom: 1px solid #E5E5E5; 
  border-right: 1px solid #ff0000; 
} 
a:link, a:visited { color: #ffffff; } 
a:hover, a:active { color: #ffffff; }  
a:hover { background-color: #FF9999; } 
p a:link, p a:visited { color: #000; } 
</style>

                <td bgcolor="#ffffff" valign="top" height="155" width="194">   
                    <table border="0" cellpadding="1" cellspacing="1" width="97%" bgcolor="#000000">   
                        <tr> 
                            <td bgcolor="ff0000" width="100%">                                <center>   
                                    <p align="left"><b><font size="2" face="Verdana" color="white">NAVIGATION</font></b><font size="2" face="Verdana" color="white">   
</font></p> 
                                </center> 
</td> 
                        </tr> 
                               
                        <tr> 
                            <td bgcolor="#FFFFFF" width="190">   
 
                                              
                                         
  <li><a href="index.htm"><b>HOME</b></a><b></b></li>   
<li><a href="2.htm"><b>UNTERNEHMEN</b></a><b></b></li>   
 
<li id="youarehere"><a href="/3.htm"><b>PRODUKTE</b></a><b></b></li>   
<li><a href="4.htm"><b>SHOP</b></a></li>   
 
<li id="youarehere"><a href="5.htm"><b>KONTAKT</b></a><b></b></li>   
<li><a href="6.htm"><b>IMPRESSUM</b></a></li>   
                                              
                            </td> 
                        </tr> 
                    </table>

</body>

</html>

Content-Key: 44197

Url: https://administrator.de/contentid/44197

Printed on: April 19, 2024 at 22:04 o'clock

Member: Mitchell
Mitchell Nov 11, 2006 at 13:36:37 (UTC)
Goto Top
Probier's mal so:

<html>

<head>
<title>Menuleiste</title>
</head>

<body>

<style type="text/css">   
ul#navigation { 
width: 12em; 
} 
li { 
list-style: none; 
background-color: #ff0000; 
border-top: solid 1px #E5E5E5; 
text-align: left; 
margin: 0; 
} 
li a { 
display: block; 
text-decoration: none; 
padding: .25em; 
border-bottom: 1px solid #E5E5E5; 
border-right: 1px solid #ff0000; 
} 
a:link, a:visited { color: #ffffff; } 
a:hover, a:active { color: #ffffff; } 
a:hover { background-color: #FF9999; } 
p a:link, p a:visited { color: #000; } 
</style>

<td bgcolor="#ffffff" valign="top" height="155" width="194">   
<table border="0" cellpadding="1" cellspacing="1" width="97%" bgcolor="#000000">   
<tr> 
<td bgcolor="ff0000" width="100%"> <center>   
<p align="left"><font size="2" face="Verdana" color="white">NAVIGATION</font><font size="2" face="Verdana" color="white">   
</font></p> 
</center> 
</td> 
</tr> 

<tr> 
<td bgcolor="#FFFFFF" width="190">   


<li><a href="index.htm">HOME</a></li><li><a href="2.htm">UNTERNEHMEN</a></li><li id="youarehere"><a href="/3.htm">PRODUKTE</a></li><li><a href="4.htm">SHOP</a></li><li id="youarehere"><a href="5.htm">KONTAKT</a></li><li><a href="6.htm">IMPRESSUM</a></li></td>   
</tr> 
</table>

</body>

</html>

Die Listings müssen einfach direkt aneinander stehen. Leider habe ich jetzt kein Firefox, um es auch da zu testen. Beim IE klappt's.

Mfg

Mitchell
Member: Franzmann
Franzmann Nov 11, 2006 at 14:36:59 (UTC)
Goto Top
Hey,
yo super klappt 1A !! Danke !
Jetzt habe ich nur noch das Problem das es linksbündig sein muss.
Also "Home" soll genau unter "Navigation" stehen.
Hast du ne Idee ?
Member: Mitchell
Mitchell Nov 13, 2006 at 06:38:14 (UTC)
Goto Top
kanns hier leider nicht ausprobieren. Du musst also entweder warten, bis ich wieder zu Hause bin (am Wochenende) oder es antworten andere face-smile


Mfg

Mitchell
Member: Franzmann
Franzmann Nov 13, 2006 at 06:52:15 (UTC)
Goto Top
...warte ;D ...
Member: Mitchell
Mitchell Nov 18, 2006 at 16:51:12 (UTC)
Goto Top
so....da bin ich face-smile

Erstmal: Es funktioniert auf jedenfall mit einer Tabelle, allerdings nicht in deinem Code. Da ich mich aber leider zu wenig mit HTML auskenne, musst du da nochmal ran.

Hier also meine Lösung (mit einem Teil von deinem Code):

<td bgcolor="#ffffff" valign="top" height="155" width="194">   
<table border="0" cellpadding="1" cellspacing="1" width="97%" bgcolor="#000000">   
<tr> 
<td bgcolor="ff0000" width="100%"> <center>   
<p align="left"><font size="2" face="Verdana" color="white">NAVIGATION</font><font size="2" face="Verdana" color="white">   
</font></p> 
</center> 
</td> 
</tr> 

<tr> 
<td bgcolor="#FFFFFF" width="190">   


<table><a href="index.htm">HOME</a></table><table><a href="2.htm">UNTERNEHMEN</a></table><table><a href="/3.htm"></table><table>PRODUKTE</a></table><table><a href="4.htm">SHOP</a></table><table></a></table><table><a href="5.htm">KONTAKT</table><table></a></table><tabel><a href="6.htm">IMPRESSUM</table></a></td>  
</tr>

du siehst, ich habe statt einer Liste eine Tabelle geschrieben. Wenn ich diese allerdings in deinen Code einfüge (sieht dann so aus),

<html>

<head>
<title>Menuleiste</title>
</head>

<body>

<style type="text/css">   
ul#navigation { 
width: 12em; 
} 
li { 
list-style: none; 
background-color: #ff0000; 
border-top: solid 1px #E5E5E5; 
text-align: left; 
margin: 0; 
} 
li a { 
display: block; 
text-decoration: none; 
padding: .25em; 
border-bottom: 1px solid #E5E5E5; 
border-right: 1px solid #ff0000; 
} 
a:link, a:visited { color: #ffffff; } 
a:hover, a:active { color: #ffffff; } 
a:hover { background-color: #FF9999; } 
p a:link, p a:visited { color: #000; } 
</style>

<td bgcolor="#ffffff" valign="top" height="155" width="194">   
<table border="0" cellpadding="1" cellspacing="1" width="97%" bgcolor="#000000">   
<tr> 
<td bgcolor="ff0000" width="100%"> <center>   
<p align="left"><font size="2" face="Verdana" color="white">NAVIGATION</font><font size="2" face="Verdana" color="white">   
</font></p> 
</center> 
</td> 
</tr> 

<tr> 
<td bgcolor="#FFFFFF" width="190">   


<table><a href="index.htm">HOME</a></table><table><a href="2.htm">UNTERNEHMEN</a></table><table><a href="/3.htm"></table><table>PRODUKTE</a></table><table><a href="4.htm">SHOP</a></table><table></a></table><table><a href="5.htm">KONTAKT</table><table></a></table><tabel><a href="6.htm">IMPRESSUM</table></a></td>  
</tr>

</body>

</html>

zeigt der IE mir nur eine leere Tabelle an. Das selbe habe ich auch wieder mit deiner Liste probiert, kommt aber das selbe bei raus.

Sorry, dass ich dir nicht helfen kann, aber ich lerne selber erst richtig HTML face-sad. Werde aber, wenn ich Zeit finde, mir das ganze nochmal angucken. Solltest du in der Zeit die Lösung gefunden haben, wär ich froh, wenn du sie mir mitteilen würdest.

Mfg

Mitchell