Archived topic
Problem with h1 height. ¿What am I doing wrong?
3 replies · Started by David on April 24, 2019
Good morning!
I have a problem in the H1 height of the individual POST (attached photo). The are to much space between breakline.
For some reason, the title height is "1" and should be "0.3 or 0.5". In the cutomize> typography tab is correct.
The title, author and category are personalized using "Elements" with the following code:
<h1>
<font size="20">
{{post_title}}</font></h1>
{{post_author}} · {{post_terms.category}}
<br><br>
And another question... is possible by code, force the text to adapt its size (%) to avoid the line break (in case it is a very long sentence)
What I can do?
Thank you so much!
PD: Congratulations for your support and... I have seen that we can use the menu in full screen. it's very cool!
Hi there,
the issue is arising from placing the <font> tag inside the <h1>. This is overwriting the H1 properties. Also the <font> tag is really outdated and not supported in HTML 5.
Instead of that you can use some CSS like so:
.page-hero h1 {
font-size: 20px;
}
Now any H1 inside a Page Hero will use that font size. If you wanted to be selective as to which Page Heros use this CSS then you can add an Element Class in the Header Element eg. custom-hero then use this CSS:
.custom-hero h1 {
font-size: 20px;
}
It works! Thank you so much :D
Glad to be of help