I have a long html page.
I want to change the direction of all text/tables to rtl.
How can i do that to all page instead of to change to any element the direction to rtl?
Thanks.
* {
direction: rtl;
}
var children = document.children;
var i;
for (i = 0; i < children.length; i++) {
children[i].style.direction = "rtl";
}
OR
document.body.style.direction = "rtl";
OR ( from evolutionxbox
comment )
document.body.setAttribute('dir', 'rtl')
$("html").children().css("direction","rtl");
<body dir="rtl">
OR
<html dir="rtl">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With