I have jquery accorion id #accordion
and some of the content inside header class name .simpleColor
. Now I want to give a calculated margin to .simp
It is not possible to do mathematic operations inside CSS natively. You could use JavaScript to change CSS properties on page load, but this is a pain and must be done every page load making your page slow.
You'll need to use a CSS preprocessor like LESS, Stylus, or SASS.
The bonus to using either of these languages is that you can generate actual CSS stylesheets from them. You also get benefits like functions, mixins, variable, and more.