The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Trouble with "transform" and "writing-mode"

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #287186

    I want to have some text rotated 90 and 270 degrees.

    When I used “transform: rotate(90deg)”, it worked, sort of: The text was rotated 90 degree and ran from top to bottom, but the two words were on two lines.

    For the left side of the page, I want the text to run from bottom to top, so I used “transform: rotate(-90deg)”. Again, the text direction was correct, but the words were split over two lines. I also tried “transform: rotate(270deg)” with the same result.

    After a bit of searching, I came across “writing-mode”.
    For the left-side top-to-bottom text, I used “writing-mode: tb-rl;”. That worked correctly.

    I then tried “bt-lr”, but that did not work at all. I tried all sorts of combinations of bees, tees, ells and aghs!, but they to did not work. The text was horizontal.

    My site is hosted on Neocities (, which has a pretty good online editor. For both HTML and CSS, it highlights well and even flags dodgy scripting. For example, if you use padding, margin along with borders, it warns that sizing may not be as expexted. It also highlight bad and invalid scripting and so on.

    Now, for my style sheet, it shows the “transform: rotate” and “writing-mode: tb-rl;” as “correct” colours, but for other variations of “writing-mode:—“, it’s all light grey, which suggests something isn’t quite right, but it doesn’t flag it as invalind script.

    I have also tested these on the desktop of my PC, so it doesn’t run through Neocites servers and I get the same results, so I don’t think it is due to any “undocumanted features” of the Neocites service. I’m 99,999999% sure I’ve missed something/done something wrong, but I can’t fathom out what it is.

    The actual webpage is at:

    Thanks for any help anyone can offer.




    I found an answer on Stackoverflow:

    It turns out that only “writing-mode: tb-rl;” works as it stands. If you want the text to run from bottom to top, then you need to use “transform: rotate(-180deg)” as well.

    This is what I ended up with:

    .PrevPage p {
    writing-mode: tb-rl;
    transform: rotate(-180deg);
    padding: 0;
    margin: 0;

    It woks a treat now.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.