title: Centering dynamic text in CSS
body: <p>I have song titles received from my Icecast server and are always changing according to the playlist. </p>
  
  <p>Obviously some titles are longer then the others and vise versa.</p>
  
  <p>I'm trying to center the text in that box so it would always fit in the middle, no matter the title length.</p>
  
  <p>How can i achieve that?</p>
  
  <ul>
  <li><a href="http://radio.tranceil.co.il" rel="nofollow">The player</a></li>
  </ul>
  
  <p>The Div CSS:</p>
  
  <pre><code>.now_playing div {
      white-space:nowrap;
      font-size:13px;
      line-height:24px;
      position: relative;
      min-height: 30px;
      padding-left: 100px;
      text-align: center;
      right: 36px;
  }
  </code></pre>
  
  <p>The Anchor CSS:</p>
  
  <pre><code>.now_playing a {
      font-family: HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", sans-serif;
      font-size: 12px;
      color: #fff;
      text-decoration: none;
     position: absolute;
      top: 50%; left: 0;
      width: 90px;
      height: 30px;
      margin-top: -15px;
  
  }
  </code></pre>