问题
In my webpage I set the locale to arabic and want to change the direction of the content display from right to left by using <html dir = "rtl">
. But it is not displaying all the divisions of webpage from right to left some are getting reflected and some are not.
Is there any suggestion to change all the content display from right to left of a web page?
回答1:
This is old question, but i hope it'll help someone,
If direction:rtl;
didn't work then try to override bidi in your css
unicode-bidi: bidi-override !important;
direction: unset !important;
text-align:right;
回答2:
The following code
body {
direction: rtl;
}
will work like sugar.
回答3:
HTML dir="rtl"
or CSS direction:rtl
is to control BiDi for the language script.
But in most cases where mixing different scripts you need to add also HTML align="right"
or CSS text-align:right
which is used to control visual display alignment.
回答4:
You can use CSS instead:
html {
direction: rtl;
}
Have a look at this page from W3 about your issue.
来源:https://stackoverflow.com/questions/19997153/html-direction-attribute-is-not-working