I am facing a small issue that I can't seem to solve. I want the text to always be displayed in bold with a font-weight of 700, but when one of the radio buttons is clicked, I need the font-weight to reduce to 300.
Is there a way to achieve this effect using only CSS and without JavaScript?
Here is the code snippet I have:
#content{
color: #333;
font-weight: 700;
}
.radio_item_menu:checked + #content {
font-weight: 300;
}
<input type="radio" name="navbar_menu_store" id="input_description" class="radio_item_menu">
<label for="input_description" class="label_item_menu">Description</label>
<input type="radio" name="navbar_menu_store" id="input_shipping" class="radio_item_menu">
<label for="input_shipping" class="label_item_menu">Shipping</label>
<div id="content"><p class="testo_scheda">
This is some text</p>
</div>
I have tried implementing it but the font weight does not change when I select the radio buttons. Link to my code Thank you!