Is there a way to make a div's height depend on one sub div's content but not another?

If I have a div with two sub div's within: is it possible to have height:auto; on the parent element but only apply it to one child element, and have the other set to overflow-y:scroll;? Here is an examlpe: http://jsbin.com/equpor/2/edit This is what I mean: can I make div.one adept it's height to div.two but ignore div.three? Is there any proper way to solve this? Thank you! Edit: The content in div.three is generated by a php foreach loop from an xml file, so I want to be able to edit the xml without editing the html/css every time. So I don't know how long div.three will be. I want it to be dynamic.

以上就是Is there a way to make a div's height depend on one sub div's content but not another?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏