Re: css hover without link
>Would your approach of using javascript be more reliable, do you think?
If the user disables Javascript, then it will not work
I am not sure how its done on that page, but i made this form that does
basically the same thing, be sure to not have any space after the li tags with
the onclick atribute set, or the behavior won't work in FF or Opera.
<style>
.answer{
font-size:14px;
height:3.5em;
padding-top:1.5em;
padding-left:1em;
cursor:pointer;
cursor:hand;
}
</style>
<body>
<form name="form1" action="" method="post">
<ul style="list-style:none; margin-left:-.5em;">
<li>Are you awake?</li>
<li onmouseover="style.backgroundColor='#FF0000'"
onmouseout="style.backgroundColor='#FFFFFF'"
onclick="this.firstChild.checked=true" class="answer"><input name="radio1"
type="radio" value="yes" />Yes
</li>
<li onmouseover="style.backgroundColor='#FF0000'"
onmouseout="style.backgroundColor='#FFFFFF'"
onclick="this.childNodes[0].checked=true" class="answer"><input name="radio1"
type="radio" value="no" />No
</li>
<li>Are you alive?</li>
<li onmouseover="style.backgroundColor='#FF0000'"
onmouseout="style.backgroundColor='#FFFFFF'"
onclick="this.firstChild.checked=true" class="answer"><input name="radio2"
type="radio" value="yes" />Yes
</li>
<li onmouseover="style.backgroundColor='#FF0000'"
onmouseout="style.backgroundColor='#FFFFFF'"
onclick="this.childNodes[0].checked=true" class="answer"><input name="radio2"
type="radio" value="no" />No
</li>
</ul>
</form>
</body>
|