简体   繁体   English

jQuery DataTable列宽问题

[英]Jquery DataTable Column Width Issue

I am using jquery datatable and its working fine the problem i am facing is that i have a column named Email inside my dataTable . 我正在使用jquery datatable及其工作正常,我面临的问题是我在dataTable中有一个名为Email的列。 Now what happens is that when some one put input into email address or anyother column like this 现在发生的事情是,当有人将输入内容输入到电子邮件地址或类似的其他任何列中时

abadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.comabadc@gmail.com

then my DataTable look weird i know the reason that there is no space between these email address but is there any other hack like can we do it using css to force column to show multi line if it cross desired length. 然后我的DataTable看起来很奇怪,我知道这些电子邮件地址之间没有空格的原因,但是还有其他任何破解方法,例如我们可以使用CSS强制列显示跨过所需长度的多行代码吗?

Try the CSS word-wrap property to force words to break: http://www.w3schools.com/cssref/css3_pr_word-wrap.asp 尝试使用CSS自动换行属性强制单词中断: http : //www.w3schools.com/cssref/css3_pr_word-wrap.asp

You also might need to set your table-layout to fixed for this to work: http://www.w3schools.com/cssref/pr_tab_table-layout.asp 您可能还需要将表格布局设置为固定,以使其正常工作: http : //www.w3schools.com/cssref/pr_tab_table-layout.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM