开发者

Website in right-to-left languages (Arabic, Hebrew)

I currently developing a multi-language interface for a Django project. But when I started to work on Arabic and Hebrew languages, I noticed all pages messed up after dir="rtl" to html tag (according to instruct开发者_开发技巧ions on http://www.w3.org/International/tutorials/bidi-xhtml/)

Does that mean I need separate stylesheets for right-to-left languages?


Do not put the style attribute to the html tag.

Use the dir='rtl' attribute only inside the div's where you actually use Arabic and Hebrew. Not for the entire page.


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

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

In the rtl.css it will be flipped like this:

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜