Course Content

Right-align all text with CSS (for RtL languages)

Murray Gray in Course Content

Nov 22, 2023 - 1 min read. .

Table of Contents

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;