Text only carousel
I think the carousel-controls
are designed to overlay the content, whether it's text or images. It would seem that text-center
would be a good option to center the text of each item.
However, as of BS alpha 6, the .carousel-item
is display:flex;
which limits some of the positioning you can do with the contents of carousel-item
. There is an open issue for this:
https://github.com/twbs/bootstrap/issues/21611
As a workaround, you could use text-center
and override display:block
for the active carousel item:
<div class="carousel-item text-center p-4">
<p>lorem ipsum (imagine longer text)</p>
</div>
.carousel-item.active {
display:block;
}
Demo: http://www.codeply.com/go/OJHdvdXimm
Also see: Vertically center text in Bootstrap carousel