How to force line-height in css without stretch marks?

How can I force the line height in CSS so that no capital letters stretch the line height. Instead, they should pin under the specified string, or even merge with the specified string.

CSS line-heightseems to work like the default, the default MS Words parameter is the default. I want it to work as an option for MS Words "for sure."

For instance:

There, the lines do not have the same height, because one line has several capital letters in it. I want all lines to be the same height regardless.

+5
source share
4 answers

( ) . , , ; .

, .

.

, 8.5px , .

, , ( ). overflow:hidden;, , .

, "" , CSS3, transform:scale(value) ..

Reference


:

<p>ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac <b>ac</b>
ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac</p>

CSS:

p {
    line-height:17px;        
    font-size:15px;
    width:150px;
}
b {
    font-size:25px;
    line-height:1px; 
}โ€‹
+6

, , , , .

b {
    display:inline-block;
    overflow:hidden;
    vertical-align:top;
   } 
+1

Maybe add

display:inline-block;
height:13px;

to tag b

0
source

In no case. You might consider increasing the line height, for example 30px, and you will get the same height as all the lines.

-1
source

All Articles