Take a look at the code below...
As you can see the 'HAZEL(NUT)' and 'HASSEL(NØD)' has a different parent to the checkbox. Which is why I think the checkbox works for the font-weight part, but doesn't work for selecting #hazelnut or #hasselnod. If anyone could help me with the correct selector for #hazelnut and #hasselnod I would be very grateful.
Hope this is clear, I'm quite a newbie to HTML and CSS, so have trouble explaining what I mean sometimes!
HTML here:
<div class="container" id="lang"> <input type="radio" id="english" name="language" value="english" checked="checked" /> <input type="radio" id="dansk" name="language" value="dansk" /> <ul> <label for="english"><li id="en">ENGLISH</li></label> <label for="dansk"><li id="dk">DANSK</li></label> </ul> </div> <div class="container" id="myname"> <h1 id="hazelnut">HAZEL<br>(NUT)</h1> <h1 id="hasselnod">HASSEL<br>(NØD)</h1> </div> CSS here:
#dansk:checked ~ * #dk { font-weight: 700; } #dansk:checked ~ * #en { cursor: pointer; } #dansk:checked * #hazelnut { display: none; } #english:checked ~ * #en { font-weight: 700; } #english:checked ~ * #dk { cursor: pointer; } #english:checked * #hasselnod { display: none; } Many thanks!