我经常使用含有必须正确调整的数字的表格,以便数字/数字/数字/数字/数字/千差万分。 与此类似:
2,343
1,000,000
43
43,394
232,111
Column headers in these tables are centered. When the table columns are wide, it doesn t look great:
Column 1 Column 2
===========================|===========================
2,343 | 32
43 | 44,432
12,243,394 | 23
232,111 | 4,432
是否有办法利用javascript、j Query或CSS来集中数字,但保留正确的理由? 期望的最终结果是:
Column 1 Column 2
===========================|===========================
2,343 | 32
43 | 44,432
12,243,394 | 23
232,111 | 4,432
I know I could set td padding globally, but I am looking for a dynamic solution that will adapt to different tables, even with different column width and number width.
能否做到这一点?