rollovers un peu différent
bonjour, je voudrais créer une sorte de rollovers ou lorsque l'on passe sur l'image la couleur de fond du div change en passant par du code css et des class. Voici mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>test2</title>
<style type="text/css">
*.cb {background-color:#222222;}
*.chalon {background-color:#999999;}
</style>
</head>
<body>test2<br>
<div style="width: 825px;" class="cb" name="tab">
<a href="test" onmouseover="tab2.tab.className=chalon;"><img style="border: 0px solid ; width: 631px; height: 637px;" alt="" src="carte-de-france.png"></a>
<br></div>
</body>
</html> |
J'arrive pas à voir ce qui marche pas.
j'ai aussi essayé sa:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta
content="text/html; charset=ISO-8859-1"
http-equiv="content-type"><title>test2</title>
<style type="text/css">
table#cb {background-color:#555555;}
table#chalon {background-color:#A80000;}
</style></head><body>test2<br><table id="cb"><tbody><tr><td
style="width: 825px;"><a href="test"><img
class="chalon"
style="border: 0px solid ; width: 631px; height: 637px;" alt=""
src="carte-de-france.png" onmouseover="this.className='chalon';"></a><br></td></tr></tbody></table></body></html> |
mais sa modifie le td alors que je souhaiterais modifier le table.