0

Open css rule within a rule is possible?

.Hair { z-index:50; div { position:absolute; } }

23rd Aug 2018, 1:41 AM
Fredy
Fredy - avatar
4 Respostas
+ 2
Yes. but slightly different syntax .Hair { z-index:50; } .Hair div { /*Applies to all div tags inside any tag with class Hair*/ position: absolute; }
23rd Aug 2018, 2:00 AM
voidneo
+ 1
If you really want to nest CSS styles, you should look into a CSS preprocessor. They are all roughly the same, but in this case, I would recommend SCSS (a derivative of SASS). Otherwise, what noname said was absolutely on point.
23rd Aug 2018, 7:52 AM
Janning⭐
Janning⭐ - avatar
0
Thanks for the answer bro!
23rd Aug 2018, 2:19 AM
Fredy
Fredy - avatar
0
Thanks! I will check that.
23rd Aug 2018, 1:36 PM
Fredy
Fredy - avatar