Answer the question
In order to leave comments, you need to log in
How to assign another class to an element with style in stylesheets?
For example<div class="col"></div>
.col{
background:#222;
/* а тут бы как то хитро добавть уже ранее описаный стиль например от бутстрапа col-md-12*/
}
Answer the question
In order to leave comments, you need to log in
You can attach several classes to each element, listing them separated by a space:
.one{
color: red;
}
.two{
background: tomato;
}
You can assign a style name (class) multiple times both in one element and in different ones! The whole point here is in the style hierarchy (priority)!
Those. if the table has both class and style assigned at the same time: table class="name" style="margin:10px 0;" ...
then class=name styles are applied and then style="..." are completed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question