How do I make p
and span
have the same line-height in HTML 5?
.main-body-text {
color: #666;
font-size: 10px;
font-family: robotolight, sans-serif;
text-align: left;
line-height: 14px;
}
How do I make p
and span
have the same line-height in HTML 5?
.main-body-text {
color: #666;
font-size: 10px;
font-family: robotolight, sans-serif;
text-align: left;
line-height: 14px;
}
Problem is that p
and span
have different display
types, resulting in different behaviors due to hidden spaces between lines.
If you want both of them to have the same line-height
, force them to be of the same type :
display:inline; // or 'block' or 'inline-block'