W3C home > Mailing lists > Public > www-style@w3.org > March 2006

Simple arithmetic in width and height attributes

From: Mark Cilia Vincenti <mark@gfi.com>
Date: Tue, 07 Mar 2006 07:48:06 +0000
Message-ID: <42B56C6A683EBA4581C01CB49A914CA707ECCC27@MAILFAXSRV.gfimalta.com>
To: <www-style@w3.org>




Hi,

I think it would be quite useful to have simple arithmetic to be allowed
in the width and height attributes. This does not necessarily give one
extra functionality, but results in cleaner, smaller code when trying to
achieve some specific designs.

Some examples:

<div style="width:50%+10;">this is some text that's 10 pixels over half
of the allocated space</div>

<div style="width:100%-10;">this works almost identically to
margin-right:10px;</div>

<div style="width:1%+100;">this sets a minimum width of 100 pixels, but
grows slightly larger, depending on the width of the allocated space.
Not easily achievable with current standards.</div>


Best regards,
Mark Cilia Vincenti

  
This mail was checked for viruses by GFI MailSecurity. 
GFI also develops anti-spam software (GFI MailEssentials), a fax server (GFI FAXmaker), and network security and management software (GFI LANguard) - www.gfi.com 
Received on Tuesday, 14 March 2006 16:03:42 GMT

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