0

I would like to horizontally center align some texts that have been rotated 90 and 270 degrees (following the advice here) with their neighboring div (whose height can change in my application). Some of the usual tricks don't seem to work because the elements are created and processed horizontally, and then rotated.

Here is a fiddle demonstrating the problem. Thanks in advance.

HTML:

<div class="col-xs-1">
  <div class="vertical_left">
    <h3>Text to align</h3>  <!-- horizontally center this to the following div -->
  </div>
</div>

<div class="col-xs-10">
</div>

CSS:

.vertical_left{
    -webkit-transform:rotate(270deg);
    -moz-transform:rotate(270deg);
    -o-transform: rotate(270deg);
    -ms-transform:rotate(270deg);
    transform: rotate(270deg);
    white-space:nowrap;
    display:block;
}
Community
  • 1
  • 1
Animik
  • 291
  • 5
  • 15

0 Answers0