J'essaie d'avoir un système de changement de langue dans ce site Web. L'idée est d'avoir un SPAN qui affiche une liste déroulante (basée sur UL) qui contient une liste des langues disponibles. Voici un aperçu de l'effet que j'essaie d'atteindre.Besoin d'aide pour l'alignement UL positionné absolu basé sur CSS (effet de bascule)
alt text http://img337.imageshack.us/img337/3474/dropboxfinal.png
La liste déroulante est en fait une liste non numérotée qui est masquée par défaut. En vol stationnaire, je rends l'UL visible. Voici le HTML et le CSS.
HTML
<span id="langswitch">Language↓
<ul id="langlist">
<li class="en">
<a title="Current language: English" href="http://domain/en">
<img width="16" height="13" alt="English Language" src="flag-en.gif" />
English
</a>
</li>
<li class="th">
<a title="Switch to Thai language" href="http://domain/th">
<img width="16" height="13" alt="Thai Language" src="flag-th.gif" />
Thai
</a>
</li>
<li class="zh">
<a title="Switch to Chinese language" href="http://domain/zh">
<img width="16" height="13" alt="Chinese Language" src="flag-zh.gif" />
Chinese
</a>
<li>
</ul>
</span>
CSS
ul#langlist {
border:1px solid #3399CC;
color:#006699;
background:#fff;
padding:0 !important;
width:100px;
list-style:none;
position:absolute;
top:62px;
right:0;
z-index:100;
display:none;
}
span#langswitch:hover ul#langlist { display:block; }
Mais au lieu de la liste déroulante apparaissant aligné avec ma portée, il est apparaît à l'extrémité droite du navigateur. Voici la capture d'écran.
alt text http://img84.imageshack.us/img84/1687/dropbox.png
peut l'un des gourous CSS recommander ici un correctif pour cela?
Merci, m^e
Voici un tutoriel extrêmement simple sur le positionnement CSS. http://www.barelyfitz.com/screencast/html-training/css/positioning/ –
Merci Chetan.C'était une grande aide :) –