Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arabic HTML layout direction with css

Tags:

html

css

layout

To change the text direction to right to left it is known that we the following CSS code:

direction:rtl; //displays text direction as right to left

Is there any way in css to invert the total page layout direction to right to left including lists ?

like image 812
pentanol Avatar asked Dec 14 '22 16:12

pentanol


1 Answers

Add dir="rtl" to the html tag any time the overall document direction is right-to-left. This sets the base direction for the whole document.

<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
like image 182
Devender Kumar Avatar answered Jan 09 '23 01:01

Devender Kumar