Archived topic
Mixing HTML font sizes
3 replies · Started by Louis on January 7, 2019
I need to put smaller text (paragraph) on the same line as H2 or H3 tag text. I don't want to have to use a hard return. I tried adding it in HTMl but it did not work.
Thank you for your help.
Hi there,
you would need to do something like this:
<div class="custom-inline">
<h2>My H2</h2>
<p>My pargraph</h2>
</div>
And this CSS:
.custom-inline > * {
display: inline;
}
.custom-inline h2 {
margin-right: 0.5em;
}
Thank you David.
Do I add the CSS in the Simple CSS below the other CSS?
https://mindiq.com/wp-admin/themes.php?page=simple-css
Yep, personally i always add CSS to the top first to test it, and then move it to somewhere more appropriate if you have it organised. Reason being, if there is an error in your existing CSS then this can break any code that is below it :)