Is it possible to align text top
and center
(for example) using bootstrap.
I have tried using:
<label class=text-align-top text-align-center></label>
It does not seem to work.
I believe you probably wanted to have this instead:
<label class="text-align-top text-align-center"></label>
(adding quotes around the CSS class names)
This would assume, however, that you have defined both, text-align-top
and text-align-center
classes in CSS, as no such classes exist in Twitter-Bootstrap.
If you want to do this the Twitter-Bootstrap-way, you can simply use the Alignment classes, which will take care of horizontal alignments. In your case you'd use text-center
.
There are no vertical alignment classes in twitter-bootstrap, so you're going to have to set it up yourself using vertical-align: middle;
on your targeted element, or create your custom CSS class having that, ie...
CSS:
.vertical-align-top {
vertical-align: top
}
HTML (with twitter-bootstrap):
<label class="vertical-align-top text-center"></label>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With