gpt4 book ai didi

css - 表 : Containing div only has width of the first columns 内的多列 div

转载 作者:太空宇宙 更新时间:2023-11-04 10:25:08 26 4
gpt4 key购买 nike

我试图在另一个可能包含多列的 div 周围放置一个“div”。

但是,如您所见here

<table class="datatable">
<tr>
<td class="leftcolumn">Radiobuttons:</td>
<td class="rightcolumn">
<div style="border: 2px solid grey;">
before
<div class="morecols">
<label><input type="radio" name="ctypeid" value="1" /> One</label><br />
<label><input type="radio" name="ctypeid" value="2" /> Two</label><br />
<label><input type="radio" name="ctypeid" value="3" /> Three</label><br />
<label><input type="radio" name="ctypeid" value="4"checked="checked" /> Four</label><br />
<label><input type="radio" name="ctypeid" value="5" /> Five</label><br />
<label><input type="radio" name="ctypeid" value="6" /> Six</label><br />
<label><input type="radio" name="ctypeid" value="7" /> Seven</label><br />
<label><input type="radio" name="ctypeid" value="8" /> Eight</label><br />
<label><input type="radio" name="ctypeid" value="9" /> Nine</label>
</div>after
</div>
</td>
</tr>
</table>

蓝色的 div 仅与第一列一样宽。我想包含所有这三个。

我在这里错过了什么?

最佳答案

.morecols { <br>
height: 65px;
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
border: 1px solid black;
column-rule: 1px solid grey;
background-color: #ccccff;
}

关于css - 表 : Containing div only has width of the first columns 内的多列 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36847536/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com