Total members 11895 |It is currently Tue Dec 03, 2024 6:04 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Following show example for controlling the direction of your text in the HTML. We have applied two different ways of controlling the text direction , the first way is using dir attribute in the body tag and using value rtl or ltr ( right to left and left to right). The other way is using css. Changing the direction helps you to have many languages in your site. For example English language is ltr while Arabic language is rtl.

Code:
<html>
<
head>
  <
title>Control your text direction </title>
  <
style rel="stylesheet" type="text/css">
body {
 
  
font-familyarialverdanasans-serif;
  
font-size15px;
}

.
DirectionLTR {
  
directionltr;
}

.
DirectionRTL {
  
directionrtl;
}
</
style>
</
head>

<
body dir="rtl">
<
h1>Different direction for html part</h1>
<
div class="DirectionLTR">left to right div.</p>
<
div class="DirectionRTL">right to left div.</p>
</
body>
</
html>
 




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : change the direction of text in your page
 overriding the direction of text within body content     -  
 Cant change the culture or UICulture of the content page     -  
 Function printing text on a Web Page     -  
 Change the text indent in the paragraph     -  
 change Font of text in java     -  
 how to change the alignment text in html     -  
 Forum Description Text color change - Need Help     -  
 Add double quotes to text dynamically, on page load     -  
 Image Scroller-scrollbar-LINE_UP,LINE_DOWN-PAGE-UP-PAGE-DOWN     -  
 Able to Copy Text from Uneditable Text Boxes(JTextfields)     -  



Topic Tags

HTML Div






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com