line height not working on span

Solutions on MaxInterview for line height not working on span by the best coders in the world

showing results for - "line height not working on span"
Jacopo
09 Oct 2016
1<!--
2	There are a few ways to overcome this issue... Setting the display
3	value to "block" (or "inline-block") will allow the line-height style to
4 	work... Or, you could use a <div> tag instead of a <span> tag...
5-->
6
7<!-- span is set to "display:block" -->
8<span style = "display:block; line-height:12px">Yay, it works!</span>
9
10<!-- using a div instead -->
11<div style = "line-height:12px">Huh, this works too!</div>
12
13<!--
14	Happy coding, my homies! <3
15-->