W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: aspect ratio of box

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 17 Apr 2005 20:17:55 +0000 (UTC)
To: Barry <barry@polisource.com>
Cc: Simon Siemens <simon.siemens@web.de>, www-style@w3.org
Message-ID: <Pine.LNX.4.61.0504172017160.7599@dhalsim.dreamhost.com>

On Sun, 17 Apr 2005, Barry wrote:
> 
> Instead of determining the ratio, I'd like something like:
> 
> img { width: 30%; OrigWidth: 100px; OrigHeight: 100px; }
> 
> No math necessary. Just look at the image properties for Orig height and 
> width and make CSS preserve the aspect ratio when width is a percentage.

The original dimensions are a markup-level concern. You can already do the 
above, just use height and width attributes in HTML.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 17 April 2005 20:17:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT