CSS问题 - divs之间的差距 [英] CSS problem - gaps between divs

查看:72
本文介绍了CSS问题 - divs之间的差距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个布局,并且发现了div之间堆叠的差距。



可以帮助我可以很好地解释此处发生的情况。



@ Alohci非常好地解释它。

I have designed a layout and i find some gaps in the stacking of divs over each other.

can some one help me http://uniquedl.com/3closets/about.html

and

解决方案

You need this in style.css:

img { display: block }

and you need to change the height on .introduction .intro-message to 384px, to match the height of the image on the left.

Doing this solves both problems.


As an alternative to img { display: block }, you could instead do: img { vertical-align:bottom }. This also fixes.

See this answer for a good explanation of what's going on here.

@Alohci explains it very nicely.

这篇关于CSS问题 - divs之间的差距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆