Font size in span drops the line down

I have this html on a page:

<div class="col-md-12">
if ($_GET['id'] == 1){
echo "<div class='hit'>Hit<span style='color: blue'>...</span></div>";

And this css:

.hit {
font-size: calc(0.65em + 1vw);
text-align: center;

The three dots … are the color: blue. When I try to add a larger font size to them inline next to the color, for example:

<span style='color: blue; font-size: 20px'>

the whole line of code drops down a line.

how can I add a larger font size for the blue dots without dropping the line down?

any help is welcomed

I don’t see any html at all in that first snippet just PHP?

The line height will increase with the font-size so you can try setting the font-size to 0 to stop the line height increasing so much.

<span style='color: blue; font-size: 40px;line-height:0;'>&hellip;</span>

The &hellip; is the html entity for three dots (…) if you were intending to add an ellipsis (three dots are not an ellipsis although they may look visually the same).

Off topic
What is `$_GET[‘id’];`` all by itself supposed to do?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.