title: Set div width by text length
body: <p>I made this jquery:</p>
  
  <p>Define the holder div:</p>
  
  <pre><code>var cimHolder = componentWrapper.find('.cim_holder');
  </code></pre>
  
  <p>If  title exist data equals title:</p>
  
  <pre><code>    if(data.attr('title') != undefined &amp;&amp; !isEmpty(data.attr('title'))){
                  cimData = data.attr('title');
                  cimExist = true;
  
          }
  </code></pre>
  
  <p>If title exists show it in the div:</p>
  
  <pre><code>        if(cimExist){
              cimHolder.css('width', 'auto');//reset
              cimHolder.html(cimData);
  </code></pre>
  
  <p>Set the div widht by character length:</p>
  
  <pre><code>            var hossz = cimData.length*6.5;
              //console.log(cimData);
              if(parseInt(cimHolder.css('width'), 10)&gt;200){
                  cimHolder.css('width', hossz+'px');
              }
              }
  </code></pre>
  
  <p>But by this way if you get a lot of wide characters, the div will be small, but when you get a lot of narrow characters it will be long. How to fix this?  </p>
  
  <p>EDIT: if I set the div auto or 100% it will not fit by the text, just use all the space in the screen.</p>