0

I have textbox in my web application , which is right aligned . When i type normal charters (such as a, b c ...) it works properly .But if i type a $name , it appears as name$ . Why is it so .Is there any solution to avoid this . I use javascript to set the alignment $("#<%=txtName.ClientID %>").css('direction', 'rtl');

json
  • 29
  • 2
  • 9

1 Answers1

1

You have probably used the dir attribute/CSS set to rtl instead of proper CSS alignment.

The dir attribute:

This attribute specifies the base direction of directionally neutral text (i.e., text that doesn't have inherent directionality as defined in [UNICODE]) in an element's content and attribute values. It also specifies the directionality of tables.

As you can see this is not limited to alignment.

Use CSS alignment/positioning to align HTML controls.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • Thanks for your reply .I have used $("#<%=txtName.ClientID %>").css('direction', 'rtl'); to set the alignment – json Feb 14 '12 at 11:58
  • 1
    @json - Please _edit_ your question to add relevant information. Putting it in comments is not as constructive. – Oded Feb 14 '12 at 11:59