Here is the CSS:
.parent div {
height: 25px;
width: 25%;
}
.child {
width: 50% !important;
height: 50px !important;
}
Here is the HTML:
<body>
<div class="parent">
<div class="child">
<p>CHILD</p>
</div>
</div>
</body>
Browsers execute CSS from top to bottom. I read about CSS hyerarchy, and according to it, as I specificate the class it should apply its code. Anyway, it applies the .parent div code.. What am I getting wrong?