Is there any alternative attribute for dir=auto in IE

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] Exp :
english text arabic text
love حبحبحب
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前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准