Skip to main content
Right-align all text with CSS (for RtL languages)

Adjust text direction for right-to-left languages in your course by adding custom CSS to the Course Settings.

Updated over 3 months ago

Getting started

XP is already capable of displaying any language or script, however, since some of them read from right to left, we've created this article to show you how to adjust the text direction in your course for students.

To get started:

  • Open any course and open the Course Settings section

  • Open the CSS sub-section

  • Set the Enable Custom CSS For This Course toggle to ON (green)

  • You should then see the CSS field appear. Add the following CSS code to that box alongside any other code you may have already added to it.

*[style*="text-align: left"], *[style*="text-align: left"] * { text-align: right !important; } *:not(.text-center, .text-center *) { text-align: right !important; }

Did this answer your question?