Problem:
Suppose we need to display a datalist in two columns, each column fills one half of the width, with a fixed pixels of margin between the two columns though.
Because it is a datalist, we would not choose table to display them.
Solution:
1. We display the datalist with two columns.
.container dl {
float: left;
width: 50%;
}
2. Because we use float, we want the contaner to self clear.
.self_clear:after {
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
}
3. We set the margins between.
.container dl.left dt {
margin-right: 5px;
}
.container dl.left dd {
margin-right: 5px;
}
.container dl.right dt {
margin-left: 5px;
}
.container dl.right dd {
margin-left: 5px;
}
We can not set margins directly on dl because otherwise its width will exceed 50%.
4. Then the dd is a container which you can use as blocked wrapper
.
Try it with jsfiddle
Related Patterns
Blocked wrapper
分享到:
相关推荐
ASP.Net GridView Columns with Collapsible panel Embedded
Hydration Heat, Shrinkage and Deformation Under Sustained Loads of HSS Columns Filled with Self-Consolidating Concrete,韩林海,杨有福,n recent years, the possibility of using hollow structural steel...
VB Columns的举例说明 VB Columns的举例说明
update columns
fixed-columns表格固定列。
fastadmin 表格添加固定表头 bootstrap-table-fixed-columns所需插件
mysql_add_columns mysql在一个表中添加记录动态在另一表中添加列。
如有使用疑问,联系博主 bootstrap-table-fixed-columns.css固定列 冻结列
这是一个类似于俄罗斯方块的游戏,叫做Columns Game。相信大家可能也听说过。我们在系统中完美的应用了mvc模块设计,相信可以给大家很好的参考。 这个项目我们供4人做了2个月,现在对大家开源了。。。 ...
Laravel开发-laravel-calculated-columns 为Laravel模型创建计算列
Laravel开发-laravel-columns-search 拉雷维尔
最近需要对表头进行冻结,找到了bootstrap-table-fixed-columns组件(也是bootstrap-table作者写的)能实现冻结效果,但带来了其他问题,包括:排序失效、列宽错位、合并行无效等,于是引入该组件的同时,顺便解决了...
Bitmap bitmap2 = bitmap.createBitmap(bitmap, width/columns*col, height/columns*row, width/columns, height/columns); cutPic = new LittleCutPic(index,bitmap2); list.add(cutPic); } } ...
如有使用疑问,联系本人,如有使用疑问,
bootstrap-table-fixed-columnsbootstrap-table-fixed-columnsbootstrap-table-fixed-columns
bootstrap-table-reorder-columns表格拖拽排序列的一个插件 验证有效, 需放在服务器【tomcat】、【apache】、【nginx】或 【HBuilder】中调试运行即可看到真实效果
在原bootstrap-table-fixed-columns的基础上,解决了冻结列后,排序失效、列宽错位和合并行失效问题
This document describes the Sybase IQ Encrypted Column option.
ARROW(Start,Stop) draws a line with an arrow from Start to Stop (points should be vectors of length 2 or 3, or matrices with 2 or 3 columns), and returns the graphics handle of the arrow(s)....