WebKit browsers learn to calculate with CSS
The forthcoming CSS3 standard will include functions for dynamically calculating the width and height of elements. Following in the footsteps of Internet Explorer 9 and Firefox (since version 4), the open source WebKit engine now also supports the
calc() function. News of the new feature comes from the WebKit blog. Until now, the calculation function has only featured in the nightly builds of WebKit and Chromium, so some delay is to be expected before it finds its way into Safari and Chrome proper.
The current implementation is somewhat rudimentary, and in particular does not allow mixing of different units, making it of little practical use.
calc() is most useful when relative units, such as %, and em (the point size of the current font, historically the width of the capital "M") need to be combined with fixed-size units such as px. The latter is often used with frames and images which need to remain a fixed size irrespective of the font and window size.