We have to show some text which may be in English or Arabic in Page. we are facing problem with text direction.
For English the direction will be left-to-right, for Arabic the direction would be right-to-left. We have added 'dir=auto' in
to do this thing dynamically. [Means based on the content language the direction will be changed]
These change working perfectly with Firefox and Chrome. But IE doesnâ€™t support this attribute and it is challenging us to find some alternative way to do.
So, our question is, how to change the text direction 'left-to-right' / 'right-to-left' based on content (IE)?
We appreciate your help.
Unfortunately support for HTML5's dir="auto" is still very limited. However you ought to try to avoid it, as this "auto-detection" is crude by design and should be used only as a last resort. Perhaps this is a good opportunity to refine your requirements, and avoid the upcoming technical debt entirely.
以上就是Is there any alternative attribute for dir=auto in IE的详细内容，更多请关注web前端其它相关文章！