Please see picture attached, makes it easier to explain what I mean.
I'm using Bootstrap. I have a page with a col-md-4 and col-md-8. The col-md-4 has the list of countries as seen.
I'm facing two problems.
- Why aren't my country labels 'wrapping' as soon as they hit the col-md-4 width? (you can see the vertical border) I just want them to flow to the next line without going across
- Even when I artificially 'break' the labels after every X occurrences, I see this weird last label of a row breaking up and appearing on the next row (for e.g. see Cape Verde on the bottom of the picture)
Additional details:
Each of the country labels is basically a span
<div class='row'>
<div class="col-md-4">
...some other bootstrap tabs/panel stuff
<div>
<span class="mm-place" id="AU">Australia</span>
<span class="mm-place" id="CA">Canada</span>
...
</div>
</div>
</div>
and the mm-place class is defined below.
.mm-place {
border-radius: 5px;
border: 1px solid #cccccc;
font-size: 10px;
margin: 3px;
padding: 3px;
}
FIXED: Just used display:inline-block in the mm-place style, and replaced spans with div.


display:inline-blockwould have been enough. You also need to make sure the parent doesn't havewhite-space:nowrap. If it does, set it tonormalorinitial. - tao