Reputation: 11
I'm using a icon font that i create in http://iconvau.lt/, but when i place text-align center the icon don't get centered. It stays on the left.
html
<ul>
<li class="col-md-2">
<div class="icon-2"></div>
</li>
</ul>
css:
ul{ width: 200px; text-align: center; height: 200px;}
li {background: #fff;}
.icon-2:before {
content: "\f104"; text-align: center; font-family: "iconvault";
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
display: inline-block;
text-decoration: inherit;
color: #1b93b6;}
Upvotes: 0
Views: 70
Reputation: 810
Try setting the icon's margin to auto:
.icon-2 {
margin: auto;
}
Upvotes: 1
Reputation: 17
I think you should set the margin as AUTO
.icon-2
{
margin: auto;
}
Upvotes: 0