![](/img/trans.png)
[英]Adding CSS style to table in django with django_tables2
[英]What is the easiest/correct why to change the width of django_tables2 table
我希望在整个屏幕上绘制django-tables2渲染的表。 我正在使用随附的淡蓝色CSS。
class PoolTable(tables.Table):
class Meta:
model = Simple
attrs = {'class': 'paleblue','width':'100%'}
这更多是一个CSS问题。 这是我最简单的方法:
更改宽度超过100%
class PoolTable(tables.Table):
class Meta:
model = Simple
attrs = {'class': 'paleblue','width':'200%'}
这只会更改表的大小,而不会更改分页。 如果您不想更改其大小,则必须在CSS中进行更改。 我确实发现仅从分页中删除边框是最容易的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.