title: What CSS rule do I need to hide "tr" elements whose children "td"'s have child "input" elements with empty value attributes?
body: <p>I realize the question title is a bit confusing, but in reality, I mean to ask exactly what I've typed.</p>
  
  <p>I am trying to write a CSS file for printing (nausea rising) and I am wanting to eliminate white space in unnecessary rows (the necessity, or rather, the lack thereof, is determined by input fields that have empty values).</p>
  
  <p>The proper CSS syntax (if there exists any) is relentlessly eluding me.</p>
  
  <p>I have used selectors like this before:</p>
  
  <pre><code>input[type=text]
  </code></pre>
  
  <p>So I could assume (hopefully... gulp!) that I could use something like:</p>
  
  <pre><code>input[val='']
  </code></pre>
  
  <p>However:</p>
  
  <p>1) I'm not sure using apostrophes/quotes is even legal inside those brackets (what's that area of a CSS selector called, again?)</p>
  
  <p>2) I wouldn't know how to put a selector inside those brackets (if even possible) since the actual "tr"s are what I'm trying to target, just "tr"s with td children with input children with empty vals.</p>
  
  <p>Wallowing in random syntax, I tried:</p>
  
  <pre><code>tr[td input val=]
  </code></pre>
  
  <p>Very much NOT to my surprise, did I find that obviously this didn't work, then I realized I had no clue how to proceed, if I wanted to accomplish this strictly in CSS.</p>
  
  <p>~ <em>Takes a quick breathe</em></p>
  
  <p>Okay, I realize I'm asking a lot out of CSS, but if it's selector system wasn't so powerful I wouldn't even assume this possible.</p>
  
  <p>Lastly, I am already implementing javascript, jQuery, and even server-side C#.net (WebMatrix) so if this answer is best solved using these other languages, I don't mind, I just want the simplest cleanest solution, if possible, as any scripting method I use will require the addition of another class to all td elements therein, and there are many, not to mention the scripting itself.</p>
  
  <p>Any help, as always, is greatly appreciated.</p>
  
  <p>---------------------EDIT REGARDING ALNITAK'S ANSWER------------------------</p>
  
  <p>I tried to add the following jQuery just before my <code>window.print();</code> JavaScript command:</p>
  
  <pre><code>$('tr &gt; td &gt; input[value=""]').parent().parent().css('display', 'none');
  $('tr &gt; td &gt; input[value=""]').parent().parent().css('visibility', 'hidden');
  </code></pre>
  
  <p>I have checked my # of parents, and all is as it should be there. The only other thing that might be interfering is that I have razor embedded in the values by default (although they are explicitly assigned empty strings on page start so, it should be fine). Just in case though I also tried:</p>
  
  <pre><code>$('tr &gt; td &gt; input[value=null]').parent().parent().css('display', 'none');
  $('tr &gt; td &gt; input[value=null]').parent().parent().css('visibility', 'hidden');
  </code></pre>
  
  <p>But, alas, to no avail.</p>