Hi @defensiefotografie,
The class cm-entry-title is applied to all titles by default, so its CSS has higher priority than styles applied to the h1 tag alone.
CSS applies rules based on specificity and order:
h1 → element selector, low specificity.
.cm-entry-title → class selector, higher specificity than h1.
h1.cm-entry-title → combination, even higher specificity.
- Inline CSS or
!important → overrides everything else.
Because of this, the theme’s .cm-entry-title CSS overrides the general h1 styles.
Solution: In your custom CSS, use h1.cm-entry-title to target the exact element. You can also add !important if needed.
I hope this information is helpful.
Best regards!
On (for instance) https://defensiefotografie.nl/woordenlijst/ongeschreven-regels-van-oorlog/ you can see that 3.2rem overrules the custom setting.
This change occurred later today without any interruption / alteration made by me.
.single .cm-entry-header .cm-entry-title {
- font-size: 3.2rem;
}
h1.cm-entry-title {
- font-weight: 700;
- font-size: 36px;
}
.cm-entry-title {
- margin-bottom: 12px;
- font-size: 2.4rem;
- font-weight: 500;
}
h1 {
- font-family: Montserrat;
- font-weight: 700;
- font-size: 36px;
}
h1, h2, h3, h4, h5, h6 {
}
h1 {
- font-family: Montserrat;
- font-weight: 700;
- font-size: 36px;
}
h1, h2, h3, h4, h5, h6 {
}
h1 {
- font-size: 4rem;
}
h1, h2, h3, h4, h5, h6 {
- margin-bottom: 20px;
- color: #27272a;
- font-weight: 500;
- font-family: “Open Sans”, sans-serif;
- line-height: 1.3;
}
@amrit
Thanks for your reaction. It crossed with my addition.
Where comes the 3.2rem from? What pushes it?
In my custom css I wrotein the customizer it said already:
h1.cm-entry-title {
font-weight: 700;
font-size: 36px;
}
So there seems to be an overriding nuissance all by itself.
Hi @defensiefotografie,
The 3.2rem value comes from the theme’s style.css file. If you want to override this CSS, we recommend using !important it in your custom CSS, as suggested in the earlier response. For example:
h1.cm-entry-title {
font-size: 36px !important;
}
Best Regards!
Thanks. I will.
The push of 3.2 seems an error in the theme programming since it overwrites adjustments made in the customizer.
Hi @defensiefotografie,
Thank you for writing back,
We have already clarified in which cases the CSS cannot be overridden. There is no issue with the programming itself; it is about the priority of the files loading on your website. In some cases, you may need to add !important to your CSS to give it higher priority.
I hope this helps to clarify things.
Best regards,
Hi Amrit,
I put the important! in and al works fine.
Keep up the good work.