1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
| <style type="text/css">
/* MENU horizontal */
#hmenu
{
/* menu : dimensions ? position ? ... */
}
#hmenu ul
{
padding:0;
margin:0;
}
#hmenu ul li
{
display:inline-block;
list-style:none;
padding:0;
margin:0;
text-align:center; /* centrage horizontal des textes */
}
#hmenu ul li a
{
display:block; /* block : pour pouvoir les dimensionner correctement */
padding-top:3px; /* centrage vertical des textes, en fonction de la hauteur de l'image de fond et de la taille du texte */
}
/* dimensions des <li>, <a> et <img> (vide) : A ADAPTER à chaque image de fond (si différentes) */
#hmenu ul li#hmenu-accueil, #hmenu ul li#hmenu-accueil a, #hmenu ul li#hmenu-accueil a img
{
width:130px; /* A ADAPTER à l'image de fond */
height:30px; /* A ADAPTER à l'image de fond */
}
#hmenu ul li#hmenu-presentation, #hmenu ul li#hmenu-presentation a, #hmenu ul li#hmenu-presentation a img
{
width:130px; /* A ADAPTER à l'image de fond */
height:30px; /* A ADAPTER à l'image de fond */
}
#hmenu ul li#hmenu-contact, #hmenu ul li#hmenu-contact a, #hmenu ul li#hmenu-contact a img
{
width:130px; /* A ADAPTER à l'image de fond */
height:30px; /* A ADAPTER à l'image de fond */
}
/* images de fond : sur les <a> */
#hmenu ul li#hmenu-accueil a
{
background:url('img/image-130x30.png') top center no-repeat;
}
#hmenu ul li#hmenu-presentation a
{
background:url('img/image-130x30.png') top center no-repeat;
}
#hmenu ul li#hmenu-contact a
{
background:url('img/image-130x30.png') top center no-repeat;
}
/* images de fond : sur les li:hover */
#hmenu ul li#hmenu-accueil:hover a
{
background:url('img/image-130x30-hover.png') top center no-repeat;
}
#hmenu ul li#hmenu-presentation:hover a
{
background:url('img/image-130x30-hover.png') top center no-repeat;
}
#hmenu ul li#hmenu-contact:hover a
{
background:url('img/image-130x30-hover.png') top center no-repeat;
}
/* images de fond : sur les li a:active */
#hmenu ul li#hmenu-accueil a:active
{
background:url('img/image-130x30-active.png') top center no-repeat;
}
#hmenu ul li#hmenu-presentation a:active
{
background:url('img/image-130x30-active.png') top center no-repeat;
}
#hmenu ul li#hmenu-contact a:active
{
background:url('img/image-130x30-active.png') top center no-repeat;
}
/* textes des liens */
#hmenu ul li a
{
font-size:1em; /* taille des textes */
color:green;
text-decoration:none;
}
#hmenu ul li:hover a
{
color:red;
text-decoration:none;
}
</style> |
Partager