Eric B Eric B - 8 months ago 34
CSS Question

How to make a div same height as glyphicon contents?

In this simple example, the inner tag has height 14px, but the outer tag has height 20px. How can I make the container tag have the same height as its child? I tried setting the div to inline-block, but that didn't do anything.

<i class="glyphicon glyphicon-folder-close"></i>


this should do the trick

div > .glyphicon {
  display: block;