Recently, I started experimenting with Bootstrap 4 and encountered an issue with centering text in a list-group.
In Bootstrap 3, the following CSS rule worked like a charm:
.list-con {
text-align:center;
}
However, in Bootstrap 4, the text-align property only seems to center multi-line text.
li {
text-align: center;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="list-con">
<ul class="list-group test">
<li class="list-group-item test-item">
Title
</li>
<li class="list-group-item test-item">
Title2
</li>
<li class="list-group-item test-item">
Morbi id neque a eros mattis tristique at a dolor. Quisque sapien tortor, suscipit ut varius id, dictum eget tortor. Sed elit diam, tincidunt sed fringilla a, dignissim in augue. Curabitur elementum ante eget erat eleifend, a blandit odio accumsan. Nullam
mattis urna nec elit dapibus, vel suscipit nulla dictum. Etiam erat magna, dictum eget pharetra et
</li>
</ul>
</div>