How specific CSS targets an element?

Aside

How specific CSS targets an element? 

#IDs = 100 Points
.Classes = 10 Points
<Elements> = 1 Points

Example:
<element> can be students of an institute
.class is a specific class consist of students of a subject.
#id is a person containing an id (Though we can use same id on more than one elements, but it’s more specific than classes). 

Pssst… use “!important” (Without quotes) after a rule to override anything [BUT DON’T OVERDO IT, IT’S NOT A QUICKFIX]:

p { color: red !important;} <<---- Now this one is more important
#main{color:black;}

QuikCode: Create Responsive menu with Bootstrap 4 (Alpha)

Bootstrap 4 Navigation responsive
Standard

The first entry of QuikCode, where I save codes for future use and quick references.

This is the code for responsive navigation bar that is also toggleable in md (medium screens).

<nav class="navbar navbar-toggleable-md bg-info navbar-inverse">
    <div class="container">
        <button class="navbar-toggler" data-toggle="collapse" data-target="#mainNav">
            <span class="navbar-toggler-icon"></span>
        </button>
 
        <div class="collapse navbar-collapse" id="mainNav">
            <div class="nav navbar-nav">
                <a href="#" class="nav-item nav-link active">Home</a>
                <a href="#" class="nav-item nav-link">Features</a>
                <a href="#" class="nav-item nav-link">About</a>
                <a href="#" class="nav-item nav-link">Contact</a>
            </div>
        </div>
 
    </div>
</nav>

 

Okay, now let’s describe about the classes according to their order in the code:

Continue reading