Find width by appending span to body
<p>I am working in jquery and javascript.Here is my problem.
I have want to find a pixel length of a string.
So what is did is</p>

<pre><code>    var text = 'abc';
    $('body').append('&lt;span id="string_span" style="font-weight: bold; font-size: 0.7em"&gt;' + text
 + '&lt;/span&gt;');
    console.log("width of text is " + $('#string_span').width());
    $('#string_span').remove();
</code></pre>

<p>But the problem is that what ever is my text length it is always returning 49.
Can any one guide me where i am doing wrong</p>

<p>Also I get correct values of width when I append my span to some other div instead of body
thanks</p>
