开发者

Should we give overflow:hidden to those div for which we are not giving height?

Should we give overflow:hidden to those div for which we are not giving height?

#Container {width:900px;margin:0 auto}

for #header which has other elements inside then should i give overflow:hid开发者_如何转开发den to #header or i should give fixed height to #header.

What is the difference between both?

#header {}

#footer {}


No, it's not needed.

That rule is used as a work around to allow a container to take the full height of its child elements when they are floated. So unless you're floating elements inside it, the rule is extraneous, as there will be no overflow because the height is not specified.

See here for more info on why you would use overflow: hidden.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜