title: CSS Display Empty DIV ONLY if there is content
body: <p>I am attempting to create a div (essentially will become a tooltip) that will display when hovered; however, I need it to display ONLY if there is content in the div</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>[data-tip] {
      position:relative;
  }
  [data-tip]:after{
      display: none;
      position: absolute;
      content:attr(data-tip);
      padding: 5px 8px;
      background-color: red;
      z-index: 10;
      height: 12px;
      border-radius: 3px;
      white-space: nowrap;
      word-wrap: normal;
  }
  [data-tip]:hover:after+[data-tip].active{
      display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div className="tooltip active" data-tip="This should display tooltip"&gt;&lt;/div&gt;
  &lt;div className="tooltip" data-tip=""&gt;This should not display&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Obviously the CSS is not complete with positioning, etc. but Ineed the most important part to work and thats displaying only when there is content in the <code>data-tip</code></p>