------------------------------------------------------------------------------------


------------------------------------------------------------------------------------

Level 1 - important


.div1{
    color: red !important;
}
.div1{
    color: blue;
}  
Level 1 - strongest is !important in the design:
text is red although should be run over by 2nd definition
because in the first selector we wrote important

Level 2 - style in the block


Level 2 - a style in the header of the block
text is green because defined locally
and not red by the div selector

3 - ID vs Class



#div2-id {
    color: orange;
}
.div2-class {
    color: pink;
}
Level 3 - a style in ID is stronger than style in CLASS
text is yellow because defined in the ID
and not Orange by the class selector

4 - Inheritance


Level 5: value of inharitance (a,b,c) classes
since the is a selector with all 3 - in overcomes
the other selector with a and b only
Level 5: value of inharitance (a,b,c) classes
since the is a selector with all 3 - in overcomes
the other selector with a and b only
back to main page