Why don’t these Japanese characters line up vertically? I want the Romaji underneath the Kanji, I don’t want vertical text.
.result {
margin-left: 4px;
float: left;
}
<div>
<span class="result">
<div>
<div>朝</div>
<div>asa</div>
</div>
</span>
<span class="result">
<div>
<div>もちろん</div>
<div>mochiron</div>
</div>
</span>
</div>
2
Answers
This fixed it
You can use the
writing-mode
css property to display vertical text.e.g.:
In this example I use
writing-mode: vertical-rl
to set the direction of the text flow,text-orientation: upright
to control the orientation of characters within the vertical text andline-height: 1.5
to control the spacing between characters.