Dynamically calculate a div width
<p>Here are sample divisions:</p>

<pre><code>&lt;style type="text/css"&gt;
#grandparent {width:100px;}
#parent {overflow:auto; height:100px; }
.child {overflow:hidden; margin-left:10px;}
&lt;/style&gt;

&lt;div id="grandparent"&gt;

&lt;div id="parent"&gt;

&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;
&lt;div class="child"&gt;1000000000000000000000000&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>The <code>&lt;div class="child"&gt;</code> width value is always 10 pixels less than <code>&lt;div id="parent"&gt;</code> width value. How can it be calculated so any width value is given to <code>&lt;div id="parent"&gt;</code>, its child gets 10 pixels less than that?</p>

<p>Any help is very much appreciated!</p>

<p>Mike</p>
