How to make an inline-block element fill the remainder of the line?

前端 未结 7 1610
抹茶落季
抹茶落季 2020-11-28 01:11

Is such a thing possible using CSS and two inline-block (or whatever) DIV tags instead of using a table?

The table version is this (borders added so you can see it):

7条回答
  •  一整个雨季
    2020-11-28 01:42

    When you give up the inline blocks

    .post-container {
        border: 5px solid #333;
        overflow:auto;
    }
    .post-thumb {
        float: left;
        display:block;
        background:#ccc;
        width:200px;
        height:200px;
    }
    .post-content{
        display:block;
        overflow:hidden;
    }
    

    http://jsfiddle.net/RXrvZ/3731/

    (from CSS Float: Floating an image to the left of the text)

提交回复
热议问题