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> |