0

I've read through some older similar questions and tried a few of the suggested html-solutions, but nothing worked so far (at least these 3: <div dir="rtl"></div>; <td dir="rtl"></td>; <html dir="rtl"></html>)

I need to create a table with the left column in English, and the right column in Arabic.

The code I used strangely worked for a bit and on some pages of the Open edX site (FUN MOOC, in case it's relevant), but it's just not working anymore after they've changed the interface afew days ago (so I hope it's just temporary). Furthermore, on the course studio/editor the text is fine, but on the course preview page it's aligned left. This is the code I have:

    <table>
    <tbody>
    <tr>
    <td td style="border: none; vertical-align: top; width: 49.25%">
<p align="justify"> </p>
    </td>
    <td style="border: none; width: 1.5%">&nbsp;</td>
    <td td style="border: none; vertical-align: top; width: 49.25%">
<p align="justify" lang="ar" dir="rtl"></p>
</td>
    </tr>
    </tbody>
    </table>

I have also used this on another page for a few titles, but would like to avoid working with this code (haven't tried checking if this still works after the interface change):

<h2 style="text-align:right">
 <span style="float:left">eng text</span>
 arabic text
</h2>

My question is: how can this be fixed? What other code could I use? (I don't know CSS well, so solutions in HTML would be amazing).

If you need more details, I can of course provide them to you. Thank you for the help!

IlaRos
  • 11
  • 1
  • Can you add a link to the course preview page where we can see the problem? – mtyaka Apr 20 '21 at 08:27
  • Hi @mtyaka ! I'm not able to share the course preview page (as the course isn't online yet), but here are some screenshots: 1- https://imgur.com/i9pvh4X (this is the studio version); 2- https://imgur.com/GOH2tPs (this is what the course will look like). We're also trying to see if this is something that needs to be fixed by the platform itself (something might not be enabled on their part) – IlaRos Apr 21 '21 at 13:09
  • Please add your code as a Stackoverflow Snippet. – Timothy Alexis Vass Apr 26 '21 at 13:00

1 Answers1

0

Without being able to access the page it's hard to tell what the problem is, but one possibility is that your dir="rtl" is overridden via CSS direction in some way.

Try adding style="direction:rtl;" to your RTL <p> element and see if that fixes it.

mtyaka
  • 8,670
  • 1
  • 38
  • 40
  • thanks for the tip! Still does nothing... tried to add it to the `

    ` element first, nothing, then added it to the `

    ` as well for good measure. I remember that at some point I added something to the `` that swapped the two columns, but it still didn't solve the issue.
    – IlaRos Apr 26 '21 at 07:17