Salut à tous
Je cherche désespéremment de mettre des images dans le background des liens d'un menu.
J'ai réussi à le faire sous IE 5.5, mais pas sous Firefox
Capture IE 5.5 :
Capture Firefox :
code XHTML :
Code :
- <ul id="menuH">
- <li id="lien1"><a href="lien.html"><span>lien 1</span></a></li>
- <li id="lien2"><a href="lien.html"><span>lien 2</span></a></li>
- <li id="lien3"><a href="lien.html"><span>lien 3</span></a></li>
- </ul>
|
code CSS :
Code :
- /* Menu horizontal */
- #menuH {
- text-align:center;
- background-color: gray;
- color: black;
- height: 30px;
- line-height: 30px;
- }
- #menuH li {
- display: inline;
- list-style-type: none;
- }
- #menuH li span {
- visibility: hidden;
- /* display: none;*/
- }
- #lien1 a, #lien2 a, #lien3 a {
- display: inline;
- }
- #lien1 a {
- background : url(img/rss.jpg) no-repeat center center;
- }
- #lien2 a {
- background : url(img/google.jpg) no-repeat center center;
- }
- #lien3 a {
- background : url(img/firefox.jpg) no-repeat center center;
- }
- #menuH li a {
- width: 88px;
- height: 15px;
- display: inline;
- }
|
La page test est >>ici<<
J'ai essayé display : block; et float: left; mais le problème aprés c'est le centrage du menu.
Non vraiment là je ne vois pas comment faire.
Pourriez-vous m'aider ?
Message édité par fafane84 le 05-01-2006 à 23:37:54
---------------
Mon Topic de Vente Hardware