开发者

Make div with top margin ignore div above it

I have two divs, one above the other, i would like the bottom div to ignore the one above it. The bottom div has the top margin property. By ignore i mean i dont want the top div to be counted when it开发者_如何学Go is using top margin (but rather to push against the wrapper which contains both divs.)


Just use absolute positioning for the top div.


If I understand correctly you could change the top div to position:absolute; which will take if out of the flow of the document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜