How can I achieve this layout in HTML & CSS ?
如何在HTML和CSS中实现这个布局?
Maybe with a table, but I need the center column to fill the blank space with a border-bottom (or something else)
可能有一个表,但我需要中心列来填充一个边框底部的空白区域(或者其他东西)
Here is a codepen
这是一个codepen
Index 1
Content
Index 2
Content
1
try this
试试这个
Index 1
Content
Index 11
Content
<----css----->
table {
width: 50%;
border-collapse: collapse;
white-space: nowrap;
}
table h5 {
margin: 0;
display:inline-block;
}
td,
tr,
table {
padding: 0;
overflow:hidden
}
.Index::after{
content:"";
width:100%;
display:inline-block;
background-color:#000;
height:1px;}
0
If you are using table then you can achieve the same by following codes
如果您使用的是表,那么您可以通过以下代码实现相同的结果。
table {
width: 50%;
border-collapse: collapse;
white-space: nowrap;
}
table h5 {
margin: 0;
}
td,
tr,
table {
padding: 0;
}
td:nth-child(2) {
border-bottom: 1px solid;
width: 100%;
}
Index 1
Content
Index 2
Content