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: Wed, 8 Mar 2006 16:30:00 +0100
Message-ID: <42B56C6A683EBA4581C01CB49A914CA707FA6FD3@MAILFAXSRV.gfimalta.com>
To: <www-style@w3.org>


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

<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 Wednesday, 8 March 2006 16:07:47 UTC

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