阿拉伯语文本在 Open edX

时间:2021-04-19 10:36:06

标签: html html-table arabic right-to-left openedx

我已经阅读了一些较旧的类似问题并尝试了一些建议的 html 解决方案,但到目前为止没有任何效果(至少这三个: <div dir="rtl"></div>; <td dir="rtl"></td>; <html dir="rtl"></html>)

我需要创建一个表格,左栏是英文,右栏是阿拉伯语。

我使用的代码奇怪地在 Open edX 站点的某些页面上工作了一段时间(FUN MOOC,以防万一),但几天前他们更改了界面后,它就不再工作了(所以我希望只是暂时的)。此外,在课程工作室/编辑器上,文本很好,但在课程预览页面上它是左对齐的。这是我的代码:

    <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>

我也在另一个页面上用过这个来写几个标题,但想避免使用这个代码(没有尝试检查界面更改后这是否仍然有效):

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

我的问题是:如何解决这个问题?我可以使用哪些其他代码? (我不太了解 CSS,所以 HTML 中的解决方案会很棒)。

如果您需要更多详细信息,我当然可以提供给您。感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

如果无法访问该页面,很难判断问题出在哪里,但一种可能性是您的 int main() { int total; int num1, num2; int choice; while(1) { choice = UI(); if (choice == 1) { cout << "Input two numbers you wish to calculate for :"; cin >> num1; cin >> num2; total = add(num1, num2); cout << " the total is " << total << "\n"; break; } else if (choice == 2) { cout << "Input two numbers you wish to calculate for :"; cin >> num1; cin >> num2; total = subtract(num1, num2); cout << " the total is " << total << "\n"; break; } else if (choice == 3) { cout << "Input two numbers you wish to calculate for :"; cin >> num1; cin >> num2; total = multiply(num1, num2); cout << " the total is " << total << "\n"; break; } else if (choice == 4) { cout << "Input two numbers you wish to calculate for :"; cin >> num1; cin >> num2; total = divide(num1, num2); cout << " the total is " << total << "\n"; break; } else { cout << "Entered wrong input, please select option 1 - 5"; } } return 0; } 以某种方式通过 CSS dir="rtl" 被覆盖。

尝试将 direction 添加到您的 RTL style="direction:rtl;" 元素,看看是否能解决问题。