I have a div
, inside different <h>
tags.
I would like to apply some formatting to ALL <h>
tags inside specifically to any with class cnt ONLY.
At the moment I'm using the following CSS without success... Any ideas what I'm doing wrong and how to fix it?
<div class="cnt">
<h1>Some Text.</h1>
<h2>Some Text.</h2>
<h3>Some Text.</h3>
<h4>Some Text.</h4>
<h5>Some Text.</h5>
<h6>Some Text.</h6>
</div>
h2 h3 h4 h5 h6 .cnt
{
font-size:16px;
font-weight:700;
}
.cnt h2, .cnt h3, .cnt h4, .cnt h5, .cnt h6 {
font-size:16px;
font-weight:700;
}
read up on css specificity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With