CSS3 > Selectors

Directions in CSS3

How to change the text direction in CSS?


Direction 

It specifies the direction of the text, the different direction properties are 

 <style>
        div.x1 {
            direction: ltr;
        }

        div.y1 {
            direction: rtl;
        }

        div.x2 {
            direction: inherit;
        }

        div.y2 {
            direction: initial;
        }
    </style>
</head>
<body>
    <div class="x1">Dotnetfunda is a online tutorial for beginners </div>
    <div class="y1">TechFunda is a online tutorial for beginners to learn step by step procedure</div>
    <div class="x2">ITFunda provides online and offline classes for the beginers </div>
    <div class="y2">KidsFunda provides entertainment for the kidfs and enjoying learning  </div>
</body>

In the above code snippet we are having direction properties which are used to align text in right and left side by using direction properties

output

 

 Views: 448 | Post Order: 39



Write for us