Is there a set of classes in Twitter\'s Bootstrap framework that aligns text?
For example, I have some tables with $
totals that I want aligned to the r
The .text-align
class is totally valid and more usable than having a .price-label
and .price-value
which are of no use any more.
I recommend going 100% with a custom utility class called
.text-right {
text-align: right;
}
I like to do some magic, but that is up to you, like something:
span.pull-right {
float: none;
text-align: right;
}
Bootstrap 4 is coming! The utility classes made familiar in Bootstrap 3.x
are now break-point enabled. The default breakpoints are: xs
, sm
, md
, lg
and xl
, so these text alignment classes look something like .text-[breakpoint]-[alignnment]
.
<div class="text-sm-left"></div> //or
<div class="text-md-center"></div> //or
<div class="text-xl-right"></div>
Important: As of writing this, Bootstrap 4 is only in Alpha 2. These classes and how they're used are subject to change without notice.