【发布时间】:2015-07-29 07:54:04
【问题描述】:
在我的表格中添加了分隔线。 工作正常。 但现在我想让这条线 在左侧和右侧留出空间。 我已经尝试过边框宽度, 但它宁愿让我的边框比定义它的宽度更厚......
那么如何在文本保持原位的情况下为该行获得空间?
我的 HTML:
<table class="layoutTable">
<tr>
<td>
<table class="philosophyText">
<tr>
<th class="header line">HEADER TEXT</th>
</tr>
<tr>
<td class="text_allground">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</tr>
</table>
我的 CSS:
#section2.section .half:last-child .philosophyText {
width:100%;
padding-left:18%;
padding-right:18%;
}
#section2.section .half:last-child .philosophyText th {
font-size: 20px;
font-size: 2.3vh;
padding-top:5.0vh;
padding-bottom:0.5vh;
font-weight:100;
}
#section2.section .half:last-child .philosophyText td {
font-size: 18px;
font-size: 1.75vh;
padding-top:2.0vh;
font-weight:300;
}
#section2.section .half:last-child .philosophyText .line {
border-bottom: solid 1px white;
}
我当前的表是这样的:
【问题讨论】:
-
你有一个
HTML标记错误...你应该关闭<td class="text_allground">