Toutes mes <li> sauf celle la
Debutant en webmastering
Messages postés
444
Statut
Membre
-
Debutant en webmastering Messages postés 444 Statut Membre -
Debutant en webmastering Messages postés 444 Statut Membre -
Bonjour,
je me demande si c'est possible de configurer toutes ses <li> d'une façon donc dans mon cas ça donne :
ul li a
{
display : block;
padding : 0;
background-color : #808080;
color : #FFFFFF;
width : 250px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 25px;
}
ul li a:hover
{
display : block;
padding : 0;
background : #808080;
color : #FFFFFF;
width : 250px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 28px;
}
mon html donne ceci :
<li id="NousSituer">
<a href="NousSituer.html"><img src="./images_polyservices/15860234.jpg" id="imageNousSituer">Nous situer</a>
</li></ul> </li>
et d'en changer juste une.
J'ai essayé ce code en css (qui devrait me changer la taille mais qui ne me donne aucun résultat)
#NousSituer
{
display : block;
padding : 0;
background-color : #808080;
color : #FFFFFF;
width : 120px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 25px;
}
#NousSituer:hover
{
display : block;
padding : 0;
background : #808080;
color : #FFFFFF;
width : 120px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 28px;
}
Signé: Debutant en webmastering
je me demande si c'est possible de configurer toutes ses <li> d'une façon donc dans mon cas ça donne :
ul li a
{
display : block;
padding : 0;
background-color : #808080;
color : #FFFFFF;
width : 250px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 25px;
}
ul li a:hover
{
display : block;
padding : 0;
background : #808080;
color : #FFFFFF;
width : 250px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 28px;
}
mon html donne ceci :
<li id="NousSituer">
<a href="NousSituer.html"><img src="./images_polyservices/15860234.jpg" id="imageNousSituer">Nous situer</a>
</li></ul> </li>
et d'en changer juste une.
J'ai essayé ce code en css (qui devrait me changer la taille mais qui ne me donne aucun résultat)
#NousSituer
{
display : block;
padding : 0;
background-color : #808080;
color : #FFFFFF;
width : 120px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 25px;
}
#NousSituer:hover
{
display : block;
padding : 0;
background : #808080;
color : #FFFFFF;
width : 120px;
text-align : center;
text-decoration : none;
line-height : 50px;
font-size : 28px;
}
Signé: Debutant en webmastering
4 réponses
-
Salut,
#id ou .class s'occupent du texte "normal". Toi, tu as du <a> qui est un texte un peu spécial. Essaye d'utiliser :
#NousSituer a
et #NousSituer:hover a
(je suis pas sûr pour le hover où placer le a par contre) -
Hello,
Cela ne sert à rien de remettre#NousSituer { display : block; padding : 0; background-color : #808080; color : #FFFFFF; width : 120px; text-align : center; text-decoration : none; line-height : 50px; font-size : 25px; }
Il suffit de préciser dans le CSS précédent :
ul li a, #NousSituer { display : block; padding : 0; background-color : #808080; color : #FFFFFF; width : 250px; text-align : center; text-decoration : none; line-height : 50px; font-size : 25px; } ul li a:hover, #NousSituer:hover { display : block; padding : 0; background : #808080; color : #FFFFFF; width : 250px; text-align : center; text-decoration : none; line-height : 50px; font-size : 28px; }
Ensuite tu reprécises juste la taille :li#NousSituer:hover { width : 120px; }
Essaye donc
Mihawk
"La rigoureusité fait la qualité" -
bon bah j't'envoie ça par mail Assassin (te moque pas de mon code je débute)
-