Bootstrap vertical writing
Asked Answered
C

4

8

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?

Co answered 19/12, 2015 at 12:45 Comment(2)
I believe that Bootstrap does not provide such functionality. I guess there would be a CSS-only solution.Romanfleuve
Also, a google search on the topic returns a bunch of examples e.g. code.tutsplus.com/tutorials/…Romanfleuve
N
16

You can do something like this:

CSS
      .verticaltext{
           width:1px;
           word-wrap: break-word;
           white-space:pre-wrap; 
        }
Nitz answered 19/12, 2015 at 13:4 Comment(1)
Thanks you. However it's a CSS hack, use it responsiblyNitz
M
9
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;
Mouser answered 23/10, 2018 at 7:56 Comment(0)
S
8

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;
}
Socialize answered 19/12, 2015 at 15:31 Comment(0)
V
-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.

Valerievalerio answered 19/12, 2015 at 12:55 Comment(2)
Please no use <br>! Don't use HTML for styling the web page!Nitz
This answer is simply wrong and should probably be deleted.Mossbunker

© 2022 - 2024 — McMap. All rights reserved.