When trying to stretch a span to the width of the div, nothing happened. And text-align, which works only for text, did not help, and inline-block, too.
How can this problem be solved?
<div class="iconBox"> <span align="center" class="glyphicon glyphicon-search" aria-hidden="true"></span> <span align="center" class="glyphicon glyphicon-hdd" aria-hidden="true"></span> <span align="center" class="glyphicon glyphicon-tasks" aria-hidden="true"></span> <span align="center" class="glyphicon glyphicon-saved" aria-hidden="true"></span> </div> .iconBox { width: 50%; margin: auto; } .iconBox span { margin: auto; }