开发者

Preventing subelement from exceeding parent's height?

开发者 https://www.devze.com 2023-01-31 18:42 出处:网络
Given this code: .yourHeaderContainer {background-color:#EEEEEE; line-height:34px; height:34px;} .yourHeaderContainer .challengeSomeone {float:right; margin-right:10px; font-size:12px; font-weight:b

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

精彩评论

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