I am trying to use inline css because I have some parameters that I need to pass that I cannot do in css files. Everything is fine if I set the style for one element, for example:
<div class="example" style="background-color:#**<?=$model->color?>**">
But since it requires a lot of elements, can this color parameter be placed in one style? If in css I do it like this:
.example h1, h2, li, p a {color: red};
I am trying to do this in embedded CSS, but it does not work:
<div class="example" style="h1, h2, li, p a color:#**<?=$model->theme_color;?>**">
Does anyone know how to do this? And can I do it inline?
source
share