CSS Table with one column taking remaining space

前端 未结 6 956
北荒
北荒 2020-12-16 13:04

I have tried now several things (and looked around here) and nothing worked so far. So I am going to ask.

What I want:

I have the following

6条回答
  •  一整个雨季
    2020-12-16 13:23

    Here is an answer using divs instead of a table: DEMO

    HTML

    First Baby
    Last Guy
    I will adjust between both of you guys

    CSS

    .container{
        width: 300px;
    }
    .first{
        float:left;
        background: red;
    }
    .last{
        float:right;
        background: orange;
    }
    .adjust{
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
    

提交回复
热议问题