This is basic, might be wrong .
Some classes have multiple names inside, for instance in Bootstrap
:
<nav class='navbar navbar-default navbar-expand-lg sticky-top'>
I am trying to understand this subject :
Using a name for a class let you set properties in
CSS
with this name, if so, why some classes gets multiple names- like this one above ?If a class has multiple names, how do you set its
CSS
properties, by which name ?If you have a class, and another inside, and you first set properties to the top(which affect the inner) and then you drill in and set different properties to the inner, will it override the outer ?
For example:
<div class="=collapse navbar-collapse navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
How would I edit the nav-item
class text color? how do you drill into it in CSS
?
So this will not work :
.nav-item{
text-align: right;
color: aqua
}
It looks like a mess with all those names, unlike coding in C++
or other language.