CSS Percentage minus Pixels

March 5th, 2006

According to Daniel Glazman, the W3C CSS Working Group has finally accepted a proposal which will mean web developers will be able to specify the width of an element in a percentage plus/minus a a set number of pixels.

"So if everything goes right, we should have in the near future a mean to say "the width of this element is 50% of the parent box's element minus 12px" !!!! This is BIG, this is poweful, this is cool. Web designers, please stay tuned, the CSS WG hears you."

Have wanted to use something like this quite a few times; sounds great! 

About the Author: Hi! I'm Ken. I've been using mobiles for over 10 years and technology for a lot longer! I'd love to hear from you.

Like this tip? Get the most from your mobile phone...

  • Discover brand new ways to use your mobile phone
  • Techniques to get more out of your mobile phone for less
  • Be the first to learn about new mobile technology

Enter your email to receive free regular Ken's Tech Tips:

  • Web Development
  • Comments(5)

5 Responses to “CSS Percentage minus Pixels”

  1. Jasidogon 06 Mar 2006 at 2:10 am

    Was just wishing I had this yesterday, seriously.

  2. Andyon 10 Aug 2007 at 2:54 pm

    I was also just wishing for it, hence why I googled for it ;)

  3. Dave McClainon 09 Apr 2008 at 12:34 am

    Well, has it happened yet??

  4. mameloukon 15 Nov 2009 at 7:40 pm

    lol this was in 2006

  5. chesteron 19 Jul 2010 at 7:42 pm

    Good news: it works now!!! :) :) :)

Trackback URI | Comments RSS

Leave a Reply