DIV表(4x4) [英] DIV TABLE (4x4)
本文介绍了DIV表(4x4)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将宽度设为100%,我想插入图片和文本到每个div。
任何人都可以帮忙吗?
你需要显示表格数据,只需使用一张表。如果您希望它能够响应,您可以将其用作布局: 示例 .row {
clear:both;
宽度:100%;
margin:0px;
padding:0px;
}
.cell {
float:left;
min-height:100px;
宽度:24%;
border:1px纯黑色;
text-align:center;
min-width:100px;
}
注意:我将单元格的最小宽度设置为100px,不要太小 - 这是使用div而不是表格的优势。如果你不会在小显示中打破结构,你真的应该使用一个表。
I am looking for a div table, with 4 columns and 4 rows.
I would like the width to be 100%, I would like to insert images and text into each div.
Can anyone help?
解决方案
If you need to show tabular data, just use a table. If you want it to be responsive you might use this as a layout: example
.row{
clear: both;
width: 100%;
margin: 0px;
padding: 0px;
}
.cell{
float: left;
min-height: 100px;
width: 24%;
border: 1px solid black;
text-align: center;
min-width: 100px;
}
Note: I set the minimum width of a cell to 100px so it won't be too small - that's the advantage of using divs instead of a table. If you don't won't the structure to break in small display, you really should use a table.
这篇关于DIV表(4x4)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文