YouTube widescreen video

Just like the teal box in the previous example, the video below should keep its format regardless of the viewport width.


#containingBlock {
.videoWrapper {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 25px;
  height: 0;
.videoWrapper object,
.videoWrapper embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;


<div id="containingBlock">
  <div class="videoWrapper">
    <object width="480" height="295">
      <param name="movie" value=""></param>
      <param name="allowFullScreen" value="true"></param>
      <param name="allowscriptaccess" value="always"></param>
      <embed src="" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed>