
March 13th, 2013, 09:35 PM
|
|
Contributing User
|
|
Join Date: Jun 2012
Posts: 106
 
Time spent in forums: 1 Day 24 m 29 sec
Reputation Power: 1
|
|
Highlight text of a radio button selection? I.E. Compatible
Hi all,
What I'm looking to do is "highlight" the text next to a radio button when it's selected. Not the radio button, but the text next to it. What I've got so far is problematic using I.E. (8 or 9). If I select the first radio button, the highlighting is delayed for about 20 seconds. The second radio button seems to highlight right away.
The HTML:
Code:
<div class="radioBtnsColor">
<input type="radio" id="radio1" name="colorOption" value="1"> <label for="radio1">Some Text Here For Radio Button 1</label><p>
<input type="radio" id="radio2" name="colorOption" value="2"> <label for="radio2">Some Text Here For Radio Button 2</label><p>
</div>
The CSS:
Code:
.radioBtnsColor input[type="radio"]:checked + label {
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-BOTTOM: #000000 1px solid;
BACKGROUND: #FFFF66;
}
How can this be improved to be I.E. compatable?
Maybe I should scrap trying to get the <label> and do something with <span> instead?
Last edited by we5inelgr : March 13th, 2013 at 09:45 PM.
|