Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datatables居中对齐 #44

Closed
heather9829 opened this issue Nov 10, 2016 · 2 comments
Closed

datatables居中对齐 #44

heather9829 opened this issue Nov 10, 2016 · 2 comments
Labels
FAQS 常见问题 Question 问题 √Solved 已解决

Comments

@heather9829
Copy link

image
我希望数据就是默认的左对齐就好,但是不知道为什么每一页第九行都居中对齐了,这个是什么问题

@Smaillife
Copy link
Collaborator

你的CSS污染了DT的CSS,要么就是你的哪个JS插件影响了table表格

@ssy341
Copy link
Owner

ssy341 commented Nov 10, 2016

@heather9829 建议你贴上代码更好,你右键审查元素看下,td有那些css,根据这个可以找出什么css影响到了

.myClassCenter{
   text-align:center;
}
columns:[
   {data:"name",className:"myClassCenter"}
]

通过上述方式也能改变name列的样式

@ssy341 ssy341 added FAQS 常见问题 Question 问题 labels Nov 10, 2016
@ssy341 ssy341 added the √Solved 已解决 label Jan 20, 2017
@ssy341 ssy341 closed this as completed Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQS 常见问题 Question 问题 √Solved 已解决
Projects
None yet
Development

No branches or pull requests

3 participants