0

I know there is a "function" to calculate e.g. percentage values plus pixel values.

The syntax lookes something like this:

#somelement {
Height: calculate ( 50% + 20px);
}

Please tell me this function is real, and not just a web designer dream....

Regards, Stefan

Dennis
  • 31,394
  • 10
  • 61
  • 78
Stefan
  • 14,332
  • 15
  • 75
  • 133

2 Answers2

1

CSS 3 includes the calc() function: http://www.w3.org/TR/css3-values/#calc.

This is a good tutorial: http://www.sitepoint.com/css3-calc-function/.

Garrett Vlieger
  • 9,146
  • 4
  • 31
  • 43
0

What you are probably looking for is the CSS3 calc. It is not widely supported, however.

W3C Spec.

MDN Documentation.

Dennis
  • 31,394
  • 10
  • 61
  • 78