Add to Technorati Favorites


Resizing YouTube embedded video - width and height ratio

To maintain reasonable proportions when resizing embedded YouTube video’s, multiply your desired height by

1.2354651162790697674418604651163

To get the correctly proportioned width.

For example: the original width of 425 pixels and height of 344 pixels resizes to 185px by 150px. The HTML fragment below shows you where to change the width and height values (change occurrences of the numbers 185 and 150).

1
2
3
4
<object width="185" height="150">
<param name="movie" value="http://www.youtube.com/v/TMtnrJdNs_o&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/TMtnrJdNs_o&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="185" height="150"></embed></object>

Posted in Tips |

Have your say