A possible way to add CSS classes in HTML


Paolo Lops
Hi David,in an html i want create a parameter  in a line like this <div id="slide-out" class='side-nav fixed light-blue-skin green ' >for the color attribute<div id="slide-out" class='side-nav fixed light-blue-skin XXX ' >how i can do?i have try with window.App.RootScope.XXX  but with no succescan you help me?

DecSoft

Hello Paolo,

I am not quite sure if can understand perfectly, but, one of the possible aproach can be the below one. Supose we have an container like this in an HTML control:

Then, in our app, we can establish the "ContainerClasses" variable in a way like this, for example:

And... the result is the expected, that is, the "ContainerClasses" CSS classes are applied to the HTML container.

Note that is also possible to establish some CSS classes "by default", in an container like that:

Then we can set the other CSS classes using the variable:

In both cases the "bg-danger" and "text-white" CSS classes are applied to the HTML container.



Paolo Lops

Hi David,

perfect it works!

DecSoft

Good Paolo. :)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.