7

I want to write text with Bootstrap, vertically but not like transform the text 90°. Vertical, but turned and hard to read.

enter image description here

But actually written like this: Vertical and not turned

enter image description here

I think there was a way to do this with Bootstrap? Do you know something?

Tasos K.
  • 7,979
  • 7
  • 39
  • 63
Janis Jansen
  • 996
  • 1
  • 16
  • 36
  • I believe that Bootstrap does not provide such functionality. I guess there would be a CSS-only solution. – Tasos K. Dec 19 '15 at 12:53
  • 1
    Also, a google search on the topic returns a bunch of examples e.g. http://code.tutsplus.com/tutorials/the-easiest-way-to-create-vertical-text-with-css--net-15284 – Tasos K. Dec 19 '15 at 12:54

4 Answers4

15

You can do something like this:

CSS
      .verticaltext{
           width:1px;
           word-wrap: break-word;
           white-space:pre-wrap; 
        }
Diego Venâncio
  • 5,698
  • 2
  • 49
  • 68
CastenettoA
  • 673
  • 5
  • 17
8
writing-mode: vertical-rl;
text-orientation: mixed;

// or

writing-mode: vertical-rl;
text-orientation: upright;

Also try these values

/* Keyword values */
text-orientation: mixed;
text-orientation: upright;
text-orientation: sideways-right;
text-orientation: sideways;
text-orientation: use-glyph-orientation;

/* Global values */
text-orientation: inherit;
text-orientation: initial;
text-orientation: unset;
Yamen Ashraf
  • 2,637
  • 2
  • 20
  • 26
7

You may want to see this tutorial!
https://davidwalsh.name/css-vertical-text

In simplicity, you can use CSS to do this.

.vertical-text {
transform: rotate(90deg);
transform-origin: left top 0;
}
eric
  • 7,142
  • 12
  • 72
  • 138
vik1245
  • 546
  • 2
  • 9
  • 26
-4

There is absolutely no specific way in Bootstrap nor in CSS alone to write in his particular way ...

I guess the only way to do that kind of thing is to make a return to the line after every letter. Try the HTML <br> tag for example. The major issue with that kind of technique is semantics, considering the word will be split.