You cannot do this in CSS, but you can in JavaScript
function hide(){ var earrings = document.getElementById('earringstd'); earrings.style.visibility = 'hidden'; } function show(){ var earrings = document.getElementById('earringstd'); earrings.style.visibility = 'visible'; }
Just make sure your td has id=earringstd
Then create a function:
function genderSelectHandler(select){ if(select.value == 'girl'){ show(); }else if(select.value == 'boy'){ hide(); }}
Now all you need to do is change your gender selection tag to:
<select name="sex" onchange="genderSelectHandler(this)">
Goran jovic
source share