Dépannage informatique à domicile NCT Micro
  Cliquez ici pour vous abonner à ce flux RSS  

Ce code affiche un menu horizontal avec liens vert et puces graphiques. Un survol ou clic affiche le lien en orange

Exemple de menu horizontal:


Codage CSS de l'exemple:

/* Menu avec puce graphique */
ul#menu {
margin: 0;
padding: 0;
font: bold 1em Geargia, Times serif;

/* application de l'image graphique avec list-style-image, list-style-positionforcent l'affichage des puces dans le conteneur */
list-style-image: url(image/image1.png);
list-style-position: inside;

}

#menu li {
float: left;
margin: 0 5px;

}

#menu a {
color: #000;
text-decoration: none;
padding-left: 20px;
color: green;

}

#menu a:hover, #menu a:focus {
color: orange;
}

Code HTML pour afficher le style CSS

<html>
< head>
< style type="text/css"> @import url(style/style.css);</style>
< /head>
< body>
<ul id="menu">
< li><a href="#">Lien 1</a></li>
< li><a href="#">Lien 2</a></li>
< li><a href="#">Lien 3</a></li>
< li><a href="#">Lien 4</a></li>
< /ul>
< /body>
< /html>