I'm using Twitter Bootstrap, with ASP.Net MVC.
How can I right-align the text in the TextBoxFor:
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , .dir = "rtl" })
I get the error Invalid expression term '.'
when trying above.
Thank you,
Mark
Right-click the text box for which you want to set vertical alignment. On the shortcut menu, click Format Text Box. In the Format Text Box dialog box, click the Text Box tab. In the Vertical alignment box, select Top, Middle, or Bottom.
Align the text left or right Select the text that you want to align. On the Home tab, in the Paragraph group, click Align Left or Align Right .
Apply style="text-align: right" to the input tag. This will allow entry to be right-justified, and (at least in Firefox 3, IE 7 and Safari) will even appear to flow from the right.
Try any
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , @dir = "rtl" })
or
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , @style="text-align:right"})
try
new { @class = "pmtallocated pull-right" , @dir = "rtl" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With