I am pretty new in Twitter BootStrap and I have the following problem:
I have defined this section into my page:
<!-- Column 3: -->
<div class="container">
<div class="col-md-4">
<div class="group-item">
<i class="glyphicon glyphicon-home"></i>
<h4><a href="#">TEST</a></h4>
<p>Bla Bla Bla</p>
</div>
</div>
So I want that the i tag that show the BootStrap glyphicon is on the left and that the thext (TEST and Bla Bla Bla) is on the right.
So I am trying to set the following CSS:
.groups i {
float: left;
margin-right: 15px;
width: 80px;
}
But it can’t work and I obtain that the text is under the glyphicon.
Why? What am I missing? How can I fix this issue?
Tnx
2
Answers
just applying float:left to the graphic icon you can achieve this
you are not missing any thing but the thing is that for the .glyphicon in bootstrap uses inline-block and you can understand the this thing by given js fiddle
Understanding
reference js fiddle
here is demo
DEMO
The most obvious solution is to move the glyph into the link.
This has the added benefit of making the icon clickable.
Alternatively, just float the icon