Seems reasonable. You could also do it purely via CSS. Suppose "amount" is
the third column of the table and the table has id "mytable":
#mytable td:nth-child(3) {text-align: right;}
That won't work in older versions of IE, though. In that case, you can use
jQuery:
$('.ie #mytable td:nth-child(3)').css('text-align', 'right');
That assumes you're using the conditional ".ie" class trick on the html
element, like in the "welcome" app layout.html:
<!--[if lt IE 9 ]><html class="ie no-js" lang="en"> <![endif]-->
In that case, ".ie" becomes a css selector for the entire document, but
only in IE < 9, so the jQuery will only be used in that case.
Anthony
On Monday, February 20, 2012 4:52:46 AM UTC-5, Edward Shave wrote:
>
> Currently I am using this....
>
> db.ledger.amount.represent=lambda value: DIV(value, _style="width 100%;
> text-align:right;")
>
>
>