重叠内联div [英] Overlapping inline div
问题描述
我有这个问题,我正在尝试使用jsfiddle解决它,但我没有擅长css.希望你能帮助我解决这个问题.我想在第二行分隔下一个div.只需一点空间即可避免重叠.我需要它显示内联,但问题是,如果转到下一行,则div的下一行与div的上一行重叠.知道我将所有div设置为内联显示时,如何从中添加边距?
I have this problem and I'm trying to solve it using jsfiddle but I'm not good in css. Hoping that you can help me solve this. I wanted to separate the next div on the second line. Just a little space to avoid the overlapping. I need it to display inline but the problem is if it goes to the next line, the next line of divs overlaps the previous line of divs. How can I add a margin from it knowing that I'm setting all the divs to display inline?
先谢谢您了:)
推荐答案
可以接受吗?
.a{
border:solid 1px black;
display:inline-block;
margin-bottom: 1px;
zoom: 1;
*display: inline
}
更改为inline-block
可能不是您想要的,但是如果您不介意这样做,这似乎很好.
Changing to inline-block
might not be what you're after, but if you don't mind doing that, this seems good.
我包括了使此 在IE7中工作 .
I included the hacks necessary to make this work in IE7.
这篇关于重叠内联div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!