gdoron gdoron - 1 year ago 118
CSS Question

Differences between direction and text-align in css

What are the differences between:

  • direction : rtl

  • text-align: right

(Related to this question)

Answer Source

Direction orders your element from right to left.


<div style="direction: rtl">
  <div style="display: inline-block">A</div>
  <div style="display: inline-block">B</div>

outputs: B A

Text-align display your element in the right.


<div style="text-align: right; width: 979px">

outputs test on the rightmost edge of the specified width.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download