I want the width of the div to be the same as the ‘iframe’ currently it makes the width of the div a lot bigger!
Thanks in advance
<div id="box3" onmouseup="$('#box3').stop().animate({boxShadow: '10px 10px 15px', top: 0}, 'fast')"
onmousedown="$('#box3').stop().animate({boxShadow: '3px 3px 3px', top: 3}, 'fast')" style="top: 0px;
box-shadow: 10px 10px 15px 0px rgb(102, 102, 102);">
<iframe width="700" height="525" id="SHADDOW" src="http://www.youtube.com/embed/LRo-L9zYf-M" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
Maybe too obvious, but just make it the same width as the iframe:
Another possible option:
float:leftmay have “side effects” that you don’t want, but you won’t have to concern yourself with the width of the content.Aside: I would highly suggest moving your script and CSS out of HTML attributes and into external CSS and javaScript files. Code like that is very hard to maintain.