简体   繁体   English

文本很少时如何使表格宽度完全扩展

[英]How to make table width extends fully when texts are just a few

I am using Gitbook editor and trying to make all the tables (but each with different length of texts, that's why some of them can be fully extended while others shrinks) equal width in the same page. 我正在使用Gitbook编辑器并尝试使所有表(但每个表具有不同的文本长度,这就是为什么其中一些表可以完全扩展而另一些表可以缩小)在同一页面上的宽度相等的原因。 But when I wrote the following tags in the markdown at the title row of table, it still doesn't work out. 但是,当我在表格标题行的markdown中写入以下标记时,它仍然无法解决。 Does anyone know how I may fix it? 有谁知道我该如何解决? Thank you! 谢谢!

|<table class="fixed" width="100%">公關後勤組</table>|

The appearance remains unchanged from these tags and it goes like the tables in fifth item as in the following link: http://derekya.gitbooks.io/disastermanagementmanual/content/zuo_ye_liu_cheng_v2.html 这些标记的外观保持不变,与第五项中的表类似,如以下链接所示: http : //derekya.gitbooks.io/disastermanagementmanual/content/zuo_ye_liu_cheng_v2.html

in your style.css, you have this rule: 在您的style.css中,您具有以下规则:

.book .book-body .page-wrapper .page-inner section.normal table {
    display: block;
    width: 100%;
    overflow: auto;
}

remove "display: block;" 删除“显示:块;” to get the table to its normal display mode and it will expand to fill the width as intended. 将表格恢复为正常显示模式,表格将按照预期的宽度扩展。 new rule should look like this : 新规则应如下所示:

.book .book-body .page-wrapper .page-inner section.normal table {
    width: 100%;
    overflow: auto;
}

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

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