I am working on a Multilanguage website , where in a table one of the td needs to be arabic stuff - which we know need to start from right. I tried it in many ways but couldnt crack it . Would be really appreciated if some one could help me :( .
Here in this text , the content should start from right..
<TD><div dir="rtl">
خیز ای عشق مجرد مهر را از سر بگیر<br/>
مردم و خالی شدم ز اقرار و از انکار خود
</div></TD>
Setting up a right-to-left pageAdd dir="rtl" to the html tag any time the overall document direction is right-to-left (RTL). This sets the default base direction for the whole document. All block elements in the document will inherit this setting unless the direction is explicitly overridden.
By default, the text on the landing page is displayed in the left-to-right (LTR) order. This applies to both text created using the Text widget and user input in the form fields. You can change the text direction to RTL (right-to-left) by adding CSS code to the landing page.
rtl: Specifies the direction as right to left. ltr(default): Specifies the direction as left to right which is also the default direction.
The <marquee> tag in HTML is used to create scrolling text or image in a webpages. It scrolls either from horizontally left to right or right to left, or vertically top to bottom or bottom to top.
For example, if the html tag declares the document direction to be RTL, the title element text should be displayed with a RTL base direction. At the time of writing, browsers tend to display RTL title text from right-to-left, and vice versa.
For most uses, the rtl direction style works well to solve most of all the directional problems. Of course, it always is advisable to check your layout with a professional translator. We work regularly in website localization and advise agencies on coding such as this when working in other languages.
direction The direction CSS property sets the direction of text, table columns, and horizontal overflow. Use rtl for languages written from right to left (like Hebrew or Arabic), and ltr for those written from left to right (like English and most other languages).
The property sets the base text direction of block-level elements and the direction of embeddings created by the unicode-bidi property. It also sets the default alignment of text, block-level elements, and the direction that cells flow within a table row.
The code is:
<html dir="rtl">
Updated answer using CSS:
Try this:
<span style="direction:rtl;">Arabic Text</span>
Both of these are OK:
<style type="text/css">
body { direction:rtl; }
</style>
or this:
<body dir="rtl">
or for HTML5: (but this doesn't work always)
<body dir="auto">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With