Get tag using class not working in IE 8 & 7
<p>My Script</p>

<pre><code>var cwidth   = document.getElementById('contentarea').clientWidth;
var elements = document.getElementsByClassName("shadow");

for(var i=0; i&lt;elements.length; i++) {
   elements[i].style.width = cwidth+"px";
   var anc = elements[i].getElementsByTagName("a"); // not working in IE 7 &amp; 8
   anc[0].style.width = cwidth+"px";
}
</code></pre>

<p>This script working well in all browsers except IE 7 &amp; 8</p>

<p>Any one please help me </p>
