Reating Intrinsic Ratios for Video theo http://alistapart.com/article/creating-intrinsic-ratios-for-video
Did you ever want to resize a video on the fly , scaling it as you would an image? Using intrinsic ratios for video, you can. This technique allows browsers to determine video dimensions based on the width of their containing block. 24 comments Share this on Get a great domain name for your great idea at Hover.com Ad via The Deck JOB BOARD Spiffy is looking for a Go Developer. Job listings via We Work Remotely With intrinsic dimensions, a new width triggers a new height calculation, allowing videos to resize and giving them the ability to scale the same way images do. See example one . The concept The idea is to create a box with the proper ratio (4:3, 16:9, etc.), then make the video inside that box stretch to fit the dimensions of the box. It’s that simple. The trick The padding property is the magic that styles a box with an intrinsic ratio . This is because we’ll set padding in a percentage , based on the width of the containing block. T