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

aspect ratio of box

From: Simon Siemens <simon.siemens@web.de>
Date: Sat, 16 Apr 2005 15:22:12 +0000
Message-ID: <42612D89.1070801@web.de>
To: www-style@w3.org

I'm currently exploring, how I can write XHTML documents with a layout 
that adjusts itself to the client environment like font-size, 
window-width, ... One key element seems to be that the size of images 
should not be fix. This said, I'm using something like

img {
	width: 30%;

to specify a dynamic image size. The drawback on this is, that the user 
agent can't format the whole page before it loads all embedded images, 
because it doesn't know the image height anymore. This would be a very 
interesting feature for pages with many images.

Therefore a ratio property would be helpful to encourage authors to 
write dynamic layouts:

img {
	width: 30%;
	ratio: 1.3333;

The HTML specification explicitly encourages the use of the width and 
height attribute to enable a stable layout while loading the whole page. 
However in the latest XHTML2 specification I can't find these two 
attributes anymore. Thus I assume it's a matter of the corresponding CSS 

By the way, in January this year Zoe Blade gave another use case, for 
which a ratio property would be needed 
Unfortunately it kept unanswered.

What do you think?

Received on Sunday, 17 April 2005 19:13:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC