natalia9
KPCKevin Powell - Community
•Created by natalia9 on 9/19/2023 in #front-end
why h1 is overwriting a class
Hi! I came across with a weird behaviour and wanted to know if I'm missing something.
So, in HTML it looks like this:
<div class="content-quote">
<h1>Good Software, like wine, takes time.</h1>
</div>
And then in CSS we have the following:
.content-quote {
font-size 10px;
}
At this point the font-size doesn't look like 10px, more like 30px.
And then when I add
h1 {
font-size: 10px;
}
it overwrites the class and the font looks like 10px. And it doesn't matter which of them comes first.
There are no relative units in the project and I feel very confused by this behaviour.14 replies