Search
 
SCRIPT & CODE EXAMPLE
 

HTML

How to Style a Selected Radio Buttons Label?

<style>
.radio-block input[type="radio"]:checked + label {
  background-color: red;
}
</style>

<div class="radio-block">
  <input type="radio" id="radio1" name="radios" value="on">
  <label for="radio1">On</label>

  <input type="radio" id="radio2" name="radios" value="off" checked>
  <label for="radio2">Off</label>
</div>
Comment

PREVIOUS NEXT
Code Example
Html :: event input svelte 
Html :: bootstrap diable backround on modal 
Html :: how to set a default value for a dropdownlist in html with thymeleaf spring 
Html :: How to write a empty character in HTML 
Html :: html input clear history 
Html :: html button shortcut key 
Html :: how to contrast img in html 
Html :: html color gold hex 
Html :: change the text of input file in html 
Html :: typo3 pass argument to action 
Html :: google logo link 
Html :: a tag open new tab 
Html :: html bottom right corner 
Html :: html link to new tab 
Html :: html href to gmail 
Html :: html radio button checked 
Html :: how to write python in html 
Html :: switch page html 
Html :: whitespace html 
Html :: call modal by id href 
Html :: vue render html raw 
Html :: disable overscroll html 
Html :: Change color of calendar icon in HTML Date Input 
Html :: html button send post request 
Html :: mysql date time to html input datetime-local value 
Html :: html table colspan 
Html :: favicon react render 
Html :: routerlinkactiveoptions 
Html :: input disable autocomplete 
Html :: website code example for html 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =