Just noticed that you want to target the parent element based on child class combination which is not possible using CSS alone, You can use jQuery .parent()
or .closest()
with .has()
to achieve that...
$('ul.num_class').has('li.mtext_class').closest('ul.num_class').css({
'border':'1px solid #f00'
});