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
  • 32,200
  • 11
  • 64
  • 79
Stefan
  • 14,826
  • 17
  • 80
  • 143

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,354
  • 4
  • 32
  • 44
0

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

W3C Spec.

MDN Documentation.

Dennis
  • 32,200
  • 11
  • 64
  • 79