开发者

Simple CSS height problem

I am trying to just create a basic layout, but i am having trouble to get it to auto-adjust the height. Something is wrong with the DIV-container since it's 开发者_运维百科not adding the padding correctly to the top and bottom elements. It should be the size of the highest block, right now its the menu block.

Any ideas? Website


in the container that holds your divs (the one whose height is not adjusting), use a css clear fix. Your container div will adjust once you use this method.


Add overflow: hidden; to the CSS for that particular <div>.


Inspect your HTML by using Google Chrome or Firefox with the firebug addon. Is so easy to see where and where not there is correct padding, margins etc... Additional ye see all css for a selected element as well...

Btw. When you are using padding, are you sure the rows above and below are cleared ? Tried using margins instead?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜