borhanoz
borhanoz

Reputation: 43

How change the sidebar direction to rtl in the follwing template?

I want to use this template but I want to change its direction from right to left?

.body{text-align:right; float:right;}

but it doesn't view in the reverse direction

Upvotes: 1

Views: 670

Answers (2)

Hussein Al-Mosawi
Hussein Al-Mosawi

Reputation: 1674

You have to use the direction property you can find the MDN documentation for it here https://developer.mozilla.org/en-US/docs/Web/CSS/direction

Use this rule on everything you want to change the direction of. Not only in the body. In fact, you can use this in child properties only without putting it in the <body> Just see what you want and go for it

.body {
   direction: rtl;
}

Upvotes: 0

JS Lover
JS Lover

Reputation: 622

You are looking for the direction property https://developer.mozilla.org/en-US/docs/Web/CSS/direction

body{
  direction: rtl;
}

Also, noticed that I removed the dot before the body because I am assuming your body is not a class. But you have a body tag.

<div class="body"></div>

This is the tag.

<body></body>

Upvotes: 1

Related Questions