Vertical text isn't styled correctly on ankiweb

My cards aren’t being styled correctly on ankiweb. They work fine on the mobile and desktop app. I will attach screenshots of the rendering and code.

Front Template:

{{kanji:Sentence}}

Back Template:

<script>
var replace = document.getElementById("Tags").innerHTML.replaceAll(" ", "・");
document.getElementById("Tags").innerHTML = replace;
var replace = document.getElementById("Tags").innerHTML.replaceAll("Best_Vocabulary_Builder::", "");
document.getElementById("Tags").innerHTML = replace;
</script>
{{furigana:Sentence}}
<div class="card-translation">
  <hr id=answer>
  {{Translation}}
  {{#Track}}
  <div class="card-tags">トラック番号{{Track}}</div>
  {{/Track}}
  <div id="Tags" class="card-tags">{{Tags}}</div>
</div>

Styling:

.card {
    writing-mode: vertical-rl;
    font-family: serif;
    font-size: 25px;
    text-align: left;
    color: black;
    background-color: white;
}
.card-translation {
    writing-mode: horizontal-tb;
    width: 450px;
    font-size: 18px;
    padding-right: 20px;
}
.card-tags {
    font-size: 15px;
    padding-top: 10px;
}
#answer {
    padding: 0px;
    margin-top: 10px;
    margin-bottom: 10px;
}

There are 3 fields. Sentence, Translation, and Track. Right now the work around is to wrap all the styling in a new div and float it right with fixed height and fixed width properties. It renders similarly although it’s not ideal.

Not sure, what is the intended look here, but try adding

position: absolute;
right: 0;

to the list of the .card rules

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.