title: Set Div Width to Background Image Width Css?
body: <p>Is there a pure css way of setting your div width to the width of the background image you are using for that div?</p>
  
  <p>for instance right now I'm doing this...</p>
  
  <pre><code>#homeNav{
  
      background-image:url(../images/navPieces/home.jpg);
      width:165px;
      text-align:right;
  
  }
  #aboutNav{
  
      background-image:url(../images/navPieces/about.jpg);
      width:81px;
      text-align:center;
  
  }
  #competitorsNav{
  
      background-image:url(../images/navPieces/competitors.jpg);
      width:117px;
      text-align:center;
  }
  </code></pre>
  
  <p>I'd love to NOT have to write in the width of every div. </p>
  
  <p>Any suggestions?</p>