开发者

Preventing subelement from exceeding parent's height?

Given this code:

.yourHeaderContainer {background-color:#EEEEEE; line-height:34px; height:34px;}

.yourHeaderContainer .challengeSomeone {float:right; margin-right:10px; font-size:12px; font-weight:bold; padding:0px 0开发者_开发技巧px 0px 0px;}

Is there any way I can prevent the child element from exceeding the line height (or height) of the parent container?


Do an overflow:hidden on the parent (overflow-y:hidden should work too).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜