0

In my asp.net MVC app, I'm using a HTML text input, while I apply a style to format currecy value and I want it to RIGHT align so that I also apply style.

But the cursor does not appear in text box? What is the possible reason and please provide the solution?

HTML

<input type="text" class="OnlyMoney" />

Script

$(document).ready(function () {
       $("input[type=text].OnlyMoney").live('keydown', currenciesOnly)
           .live('blur',
           function() { $(this).formatCurrency(); });

   });

CSS

.OnlyMoney { text-align: right; }

Note: If I change above style "text-align: left" then cursor is visible in text box.

TRR
  • 1,637
  • 2
  • 26
  • 43
user584018
  • 10,186
  • 15
  • 74
  • 160

2 Answers2

1

I got the answer from here. this solved my issue.

Just style your input like this:

caret-color: #333333;
Nabeel K
  • 5,938
  • 11
  • 38
  • 68
0

i faced a similar issue and adding padding solved my problem. Just give some padding right to your .OnlyMoney class and check

CSS:

 .OnlyMoney { text-align: right; padding: 0 2px 0 0; } 
TRR
  • 1,637
  • 2
  • 26
  • 43