Website in languages ​​from right to left (Arabic, Hebrew)

I am currently developing a multilingual interface for a Django project. But when I started working in Arabic and Hebrew, I noticed that all pages got messed up after dir = "rtl" with the html tag (according to the instructions http://www.w3.org/International/tutorials/bidi-xhtml/ )

Does this mean that I need separate style sheets for languages ​​from right to left?

+6
css stylesheet right-to-left translation
source share
2 answers

Do not put the style attribute in the html tag.

Use the dir='rtl' attribute only inside the div, where you are actually using Arabic and Hebrew. Not for the whole page.

+9
source share

What you need to do in addition to adding dir = "rtl" to the tag is flipping through the stylesheets. Create an rtl.css stylesheet that looks like a mirror for your default stylesheet. For example. If your style.css has this rule below:

 .some-class { margin: 10px 5px 10px 7px; } 

In rtl.css it will be flipped as follows:

 .some-class { margin: 10px 7px 10px 5px; } 

Check this out: http://rtl-this.com/tutorial/3-different-ways-rtl-your-css

+5
source share

All Articles