Eléphant du PHP |
79 Messages
26 avr. 2005, 14:26
Oui j'y ai pensé.
Mais le prob ici c'est que le lien c'est uniquement le texte et pas l'image.
Finalement j'ai changé, ce sont les lien qui prennent une classe css.
code html
Code : Tout sélectionner
<table cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="?page=album" class="lienbouttong"> </a>
</td>
<td>
<a href="?page=album" class="lienbouttonr">A</a>
</td>
<td>
<a href="?page=album" class="lienbouttonc">lbum</a>
</td>
<td>
<a href="?page=album" class="lienbouttond"> </a>
</td>
</tr>
</table>
code css :
Code : Tout sélectionner
.lienbouttonr{
background: url(image/bouttonr.jpg);
background-repeat: no-repeat;
width:36px;
height:48px;
text-align:center;
font-size: 32px;
color: #000000;
}
.lienbouttonc{
background: url(image/bouttonc.jpg);
background-repeat: repeat;
width:68px;
height:48px;
font-size: 25px;
vertical-align:center;
color: #000000;
}
.lienbouttong{
background: url(image/bouttong.jpg);
background-repeat: no-repeat;
background-position: right;
width:3px;
height:48px;
}
.lienbouttond{
background: url(image/bouttond.jpg);
background-repeat: no-repeat;
width:3px;
height:48px;
}
.lienbouttonr:hover{
background: url(image/bouttonr.jpg);
background-repeat: no-repeat;
width:36px;
height:48px;
text-align:center;
font-size: 32px;
text-decoration: none;
color: #ffffff;
}
.lienbouttonc:hover{
background: url(image/bouttonc.jpg);
background-repeat: repeat;
width:68px;
height:48px;
font-size: 25px;
text-decoration: none;
color: #ffffff;
}
.lienbouttong:hover{
background: url(image/bouttong.jpg);
background-repeat: no-repeat;
background-position: right;
width:3px;
height:48px;
text-decoration: none;
}
.lienbouttond:hover{
background: url(image/bouttond.jpg);
background-repeat: no-repeat;
width:3px;
height:48px;
text-decoration: none;
}
Etrangement j'ai était obligé de préciser l'alignment de l'image bouttong et le mettre à droit afin qu'il colle au reste de l'image sinon il y avait un espace de quelque pixel. J'ai pas eut le problème du coté droit.
Par contre comment faire un rollver qui modifie toutes l'image. C'est à dire que si je passe au dessus du A le rollover cela déclanche le code css du A mais aussi des autres éléments ?