It is required to create a group of radio buttons, but it will not be ordinary input, they will be using a div (own design).

1.Требуется очень простенькая реализация 2.Две радио кнопки обьеденены в одну группу, тоесть нажал на одну другая если активирована должна деактивироватся, нажал другую тажа история. 3.На css. 
  • one
    What does "look like a div" mean? To make 2 div blocks with the same properties as a group of radio buttons? Or should radio buttons be a block element? - Mihanik71

1 answer 1

Upd: I understand what the problem is. Added solution. Styles made, and then you can customize your needs

 input.custom{ display:none; } input[type=radio].custom:checked + label{ font-size:20px; } input[type=radio].custom + label:before{ content:"-"; padding-right:10px; } input[type=radio].custom:checked + label:before{ content:"+"; padding-right:10px; } 
 <form action=""> <input type="radio" name="test" class="custom" value="раз" id="one"><label for="one">Раз</label><br> <input type="radio" name="test" class="custom" value="два" id="two"><label for="two">Два</label> </form> 

  • I see the checkboxes work, but if you disable this very js from the browser, the checkboxes will not work until it fits. My site without js on the usual css + html5 - Denis Kotlyarov
  • And reading from me goes through the form, Ie, the use of <input> is required - Denis Kotlyarov
  • I apologize, did not understand the task. Updated the solution - Mihanik71 pm
  • Yes, I see an update. - Qwertiy
  • Oh, thanks, I see the solution and the working version, as soon as I figure it out. - Denis Kotlyarov