Hey dude,
You need a way to target the <li> but when you click on either an input or textarea. You wouldn't set the :focus psuedo on the <li> but rather on the inputs and textarea. There's only one way I would know how to achieve this.
Are you familiar with jQuery at all?
I just wrote this for you and it's got the exact same functionality.
Code:
$(function(){
$('input,textarea').focus(function(){
$(this).closest('li').css("background", "red");
});
$('input,textarea').focusout(function(){
$(this).closest('li').css("background", "none");
});
});
Maybe it could be done with just CSS though I am not sure.
I hope this helps you.
Kind regards,
LC.