css table-cell,内容有不必要的上边距 [英] css table-cell, contents have unnecessary top margin
本文介绍了css table-cell,内容有不必要的上边距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的代码中使用div块的表单元格排列。在我的代码中有一个问题。
I am using table-cell arrangement of div blocks in my code. There is a problem in my code.
预览我的html外观是如何这里
Preview of how my html looks is here
当我在第一个面板中有任何内容(文字或图片)时,第二和第三个面板的内部
div具有大约10-15个像素的顶部边距。为什么呢?
When I have any content (text or image) in my first panel then the .inner
div of the second and third panel have a top margin of some 10-15 pixels. Why is that ?
任何一个看起来,让我知道我失踪了什么。
Can any one look and let me know what I am missing.
推荐答案
在中添加
vertical-align:top;
div
add vertical-align:top;
in #wrapper > div
查看演示: http://jsbin.com/avozik/14/edit
这篇关于css table-cell,内容有不必要的上边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文