title: CSS Collapsing/Hiding divs with no data in <span>
body: <p>I am trying to display an address which includes the following information: Title, division, address1, address2, town/state/zip, and country (5 seperate lines worth of data).  The problem is sometimes the company may only have the title, address1, and town/state/zip yet other times it may be all but address2.  This is determined upon a db record request server side.  Therefore how can I make my output look proper when some of my labels will be blank?  <strong>I would like div's that contain an empty span to be essentially collapsed/removed.</strong>  My only idea of how was to use jquery and a selector to find all divs with blank spans (since thats all an asp.net label really is) and then remove those divs however this seems like such bad form.  Is there any way to do this with css?  Possible Code would be something like:  $('span:empty:only-child').parent('div').remove();  </p>
  
  <p><strong>Picture Examples</strong> (Ignore spacing/indentation issues which I will fix)</p>
  
  <p>Missing Division, Address2, and Country</p>
  
  <p><img src="https://i.stack.imgur.com/IpRNg.png" alt="Missing Division, Address2, and Country"></p>
  
  <p>All Possible Fields</p>
  
  <p><img src="https://i.stack.imgur.com/LhYXW.png" alt="All Possible Fields"></p>
  
  <p><strong>The Html</strong></p>
  
  <pre><code>&lt;asp:Label runat="server" ID="lblBillingAddressHeader" CssClass="lblBillingAddressHeader" Text="Billing Address:" /&gt;
  &lt;div style="position:relative; top:150px; left: 113px;"&gt;
      &lt;div class="test"&gt;
        &lt;asp:Label runat="server" ID="lblBillingDivision" CssClass="lblBillingShippingDivisionFont" /&gt;
      &lt;/div&gt;
      &lt;div class="test"&gt;
        &lt;asp:Label runat="server" ID="lblBillingAddress" CssClass="lblBillingShippingFont" /&gt;
      &lt;/div&gt;
      &lt;div class="test"&gt;
        &lt;asp:Label runat="server" ID="lblBillingAddress2" CssClass="lblBillingShippingFont" /&gt;
      &lt;/div&gt;
      &lt;div class="test"&gt;
        &lt;asp:Label runat="server" ID="lblBillingAddress3" CssClass="lblBillingShippingFont" /&gt;
      &lt;/div&gt;
      &lt;div class="test"&gt;
        &lt;asp:Label runat="server" ID="lblBillingAddress4" CssClass="lblBillingShippingFont" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>The CSS</strong></p>
  
  <pre><code>.test {
      position: relative;
      top: 0px;
      left: 0px;
      height: 12px;
      width: 300px;
  }
  
  .lblBillingShippingDivisionFont {
      font-size: small;
      font-weight: bold;
  }
  
  .lblBillingShippingFont {
      font-size: 10.6px;
  }
  </code></pre>