Align Decimal Data in table column by decimal point, HTML5, CSS3

前端 未结 7 1772
有刺的猬
有刺的猬 2020-12-17 21:58

I am building a wordpress plugin which is generating an HTML table and sending to gravityforms html block via shortcode.

My problem is that cell contents can contain

相关标签:
7条回答
  • 2020-12-17 22:32

    Would it be acceptable to put the value into two columns?

    Use sprintf() to convert the value into a string, and then put the bits up to the decimal point in the left column (but right aligned), and the decimal places in the second column.

    See http://jsfiddle.net/alnitak/p4BhB/, but ignore the JS bit...

    0 讨论(0)
提交回复
热议问题