- #1
jjiimmyy101
- 74
- 0
This is probably an easy solution, but I can't figure it out for the life of me. I have a bunch of radio buttons with corresponding text right next to it. What I want to happen is that when the mouse is moved over the radio button, I want the text background to get highlighted. As you can see from the code below, I only get the text background highlighted when the mouse is over the text or only the radio button is highlighted when the mouse is over the radio button. How can I fix this? Thanks. -jjiimmyy101
<input type="radio" name="Pizza" onMouseover="style.background='red'" onMouseout="style.background='white'" value="Large" id="Large">
<label for="Large" onMouseover="style.background='red'" onMouseout="style.background='white'">Large</label>
<input type="radio" name="Pizza1" onMouseover="style.background='red'" onMouseout="style.background='white'" value="Small" id="Small">
<label for="Small" onMouseover="style.background='red'" onMouseout="style.background='white'">Small</label>
<input type="radio" name="Pizza" onMouseover="style.background='red'" onMouseout="style.background='white'" value="Large" id="Large">
<label for="Large" onMouseover="style.background='red'" onMouseout="style.background='white'">Large</label>
<input type="radio" name="Pizza1" onMouseover="style.background='red'" onMouseout="style.background='white'" value="Small" id="Small">
<label for="Small" onMouseover="style.background='red'" onMouseout="style.background='white'">Small</label>