Forum Moderators: open
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>button</title>
<style type="text/css">
body {
font-family:verdana,arial,helvetica, sans-serif;
font-size:12px;
color:#333;
}
#container {
width:566px;
margin:auto;
}
#label {
float:left;
}
#label2 {
float:right;
}
#container a {
display:block;
width:173px;
height:132px;
padding:35px 20px 10px 85px;
background-repeat:no-repeat;
background-position:0 0;
font-family:tahoma,geneva,sans-serif;
font-size:20px;
color:#666;
text-decoration:none;
}
#container a:hover {
background-position:0 -176px;
}
#container a span {
font-size:40px;
}
#button {
background-image:url(yes.png);
}
#button2 {
background-image:url(no.png);
}
</style>
<script type="text/javascript">
function init(){
obj=document.getElementById('container');
inp=obj.getElementsByTagName('input');
anc=obj.getElementsByTagName('a');
for(c=0;c<inp.length;c++) {
inp[c].number=c;
inp[c].checked=false;
inp[c].onclick=function(){
for(c=0;c<anc.length;c++) {
anc[c].style.backgroundPosition='0 0';
}
anc[this.number].style.backgroundPosition='0 -176px';
}
}
}
if(window.addEventListener){
window.addEventListener('load',init,false);
}
else {
if(window.attachEvent){
window.attachEvent('onload',init);
}
}
</script>
</head>
<body>
<div id="container">
<label id="label" for="radio">
<input type="radio" name="radio" id="radio">
<a id="button">
<span>YES,</span><br>
I am currently a<br>
college student.</a>
</label>
<label id="label2" for="radio2">
<input type="radio" name="radio" id="radio2">
<a id="button2">
<span>NO,</span><br>
I am NOT currently<br>
a college student.</a>
</label>
</div>
</body>
</html>
No problem, you're very welcome. ;)
I'm glad JQuery isn't absolutely needed for something like this.