I want to know how can I achieve an arithmetic operation in CSS.
For example: I want to align two divs side by side each having width of 50% and I w
It is possible with a CSS precompiler. LESS ans Sass are very popular. You can write it just the way you did it in the example above.
LESS
Sass
http://www.lesscss.org/
LESS is more easy to handle when you are a designer. For programmers and Ruby (on Rails) developers Sass maybe the better choice.