0

I can't understend why the <span> element below has the height: 40px - how it was computed?

<span style="padding:10px; width:200px; height:30px; line-height:1; font-size:18px"></span>
David Alford
  • 1,528
  • 3
  • 10
  • 27
camelCase
  • 9
  • 2

1 Answers1

-1

Because of your height is ( exact height + padding + border ) , it's rule of box model . if you want the exact height only you should add this style to your css (box-sizing: border-box;).