开发者

CSS Vertical Spacing Issue (Margin?) - Vertical Space Between Two Divs

开发者 https://www.devze.com 2022-12-28 11:34 出处:网络
I\'ve got the layout of my site mostly done. On the domain I\'m testing this layout on - http://networkgenius.org/ - there is a vertical space separating the content-wrapper div and the menu div. I ha

I've got the layout of my site mostly done. On the domain I'm testing this layout on - http://networkgenius.org/ - there is a vertical space separating the content-wrapper div and the menu div. I have the margins set to 0px for the vertical spacing, and this is the only area that is sep开发者_Python百科arated like it is.

I'd like the white content area to be pressed up right against the bottom of the menu, so that none of the body's background shows between them.

What am I doing wrong?


Your navigation bar (#nav, #nav ul) has a height of 35px on it, but it seems like the background image isn't actually that tall, and since you seem to have set it to only repeat-x with a transparent color, you'll get that space.

Set it to 27px or smaller and you'll be fine (in Chrome, at least).


Jeff is right. Your #nav ul has a height larger than your navbar (and background image). Also, there is vertical padding on the nav ul as well that adds to the discrepancy.

0

精彩评论

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

关注公众号