J'essaye en vain d'avoir une liste horizontale (un menu en fait) compatible IE et Firefox.
Les particularités de ce menu sont un alignement à droite sauf le premier élément aligné à gauche.
Sous Firefox, pas de problème, ça fonctionne.
Par contre sous IE, il m'a tout détruit sans pitié et sans que je comprenne d'où viennent les problèmes et comment les régler (j'ai l'impression qu'il a déjà du mal avec l'alignement à droite).
Afin de ne pas baisser les bras et retomber sur une solution à base de tableau après m'avoir arraché la totalité des cheveux, je solicite votre aide (je tiens à mes cheveux après tout).
Merci d'avance.
Le code html du menu :
Code : Tout sélectionner
<div id="links">
<ul id="navlist">
<li class="left"><a href="#">Item Left</a></li>
<li><a href="#">Item Right 1</a></li>
<li><a href="#">Item Right 2</a></li>
<li><a href="#">Item Right 3</a></li>
</ul>
</div>
Code : Tout sélectionner
div#links {
display:block;
width:100%;
background-color:#cdb3ff;
padding-right:15px;
margin-left:-15px;
margin-bottom:1em;
height:1em;
text-align:right;
}
ul#navlist li.left {
text-align:left;
display:block;
float:left;
}
#navlist li {
display: inline;
margin-left:10px;
list-style-type: none;
}
#navlist a { padding: 3px 15px; }
#navlist a:link, #navlist a:visited {
color: #6700cd;
background-color: #a296ff;
text-decoration: none;
font-weight:bold;
}
#navlist a:hover {
color: #6700cd;
background-color: #b096ff;
text-decoration: none;
border-top:1px solid #6700cd;
border-bottom:1px solid #6700cd;
}