# Dynamic SWF height/width

**URL:** <https://forum.kirupa.com/t/dynamic-swf-height-width/236463>\
**Category:** web dev\
**Created:** [August 21, 2007, 5:57am UTC](https://forum.kirupa.com/t/dynamic-swf-height-width/236463 "2007-08-21T05:57:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [August 21, 2007, 5:57am UTC](https://forum.kirupa.com/t/dynamic-swf-height-width/236463/1 "2007-08-21T05:57:05Z")

</div>

Hey everyone,

I’m embedding a youtube vid on a site for a client.  
The parent element it’s in has a percentage width, so it’s of course always changing.

What I need is to have the vid’s proportions stay the same (I think the width to height ratio is like, 4.25:3.75).

In Firefox, setting the object’s width to 100% and leaving the other blank works fine, but not in IE.

I’m using the SWFObject - but I need to find a way to have the video show in it’s normal ratio irregardless of its parent element height and width.

I also tried using the width: expression(… for IE, but it didn’t pan out.
