On Mon, Feb 11, 2013 at 11:50 AM, Barney Carroll <[email protected]>wrote:
> Thierry wrote up an excellent technique for this that is incidentally very > useful when scaling embedded media. The linked article frames it in that > context, but the principles are the same: a padding property percentage > will take relative width as its reference: > > alistapart.com/article/creating-intrinsic-ratios-for-video > I must be doing something wrong. I thought I was implementing this as Thierry suggested, but my padding-bottom percentage seems to end up being a percentage of the parent element, rather than the element itself. I set up a really simple example here: http://kage23.com/blah.html Could someone possibly take a look and tell me what I'm doing wrong? If it turns out that I should just be using the parent element to set the relative height (i.e. in this case, I should be setting padding-top to 5.306122448979591836734693877551% (52/980)), I can probably do that, and in fact, it might actually be easier in the long run. But I was hoping to set the height as a percentage of the element itself, rather than it's parent element. Thanks! Kyle -- Kyle G Sessions Berkeley Electronic Press [email protected] 510-665-1200 + 128 www.bepress.com bepress: the frontier of scholarly publishing since 1999 Check out IR success stories on the DC Telegraph at http://blog.digitalcommons.bepress.com ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
