Div with maximum possible size (column spanning available width)

I have a parent div of a fixed width, and 3 divs inside, in one line. I would like that the 2nd and 3rd divs have the widths that fit its' contents, and 1st div would occupy the rest of the parent's width. All divs are single lines of text (`nowrap`), first column can truncate text if it is too long (`overflow:hidden`). I don't want to specify any widths explicitly, apart from the parent div.
span me me me me me me me
abc
def
div { border: 1px solid black; float: left; white-space: nowrap; overflow: hidden; } div#main { width:200px; } div#col1 { /*width:150px;*/ /* I don't want this! */ } div#col2 { float:right; } Fiddle here: http://jsfiddle.net/FMB2M/
it's overflow:hidden; not overlap...

以上就是Div with maximum possible size (column spanning available width)的详细内容,更多请关注web前端其它相关文章!

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

评论 抢沙发

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

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

联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏