-1

I am looking for this solution : If Radio Button is Selected Show Div

but without javascript or jquery (only using html/css)?

Thanks

1 Answers1

0

you can add focus for radio input and add style for your div

this is an example

<!DOCTYPE html>
<html lang="en">
<head>
<style>
.div{
display: none;
}
.radio:focus + .div{
  display: block;
}
</style>
</head>
<body>
<input type="radio" class="radio">
<div class="div">
<h3>hello world</h3>
</div>
</body>
</html>
  • While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Adriaan Sep 08 '20 at 14:14
  • ok thanks, I'll edit it. – yahia elbnna Sep 08 '20 at 14:18