Responsive images in tables (bootstrap 3)

前端 未结 5 1517
失恋的感觉
失恋的感觉 2020-12-15 07:05

I\'m using the Bootstrap 3 Framework and have some troubles with the \"img-responsive\" class in Firefox. I have a 4 column-Table with 15/50/10/25% layout. In the first colu

5条回答
  •  旧时难觅i
    2020-12-15 07:51

    I also had this problem, the solution for me was "table-layout fixed"

    .table-container {
        display: table;
        table-layout: fixed;
        width: 100%;
        height: 100%;
    }
    .table-cell-container {
        text-align: left;
        display: table-cell;
        vertical-align: middle;
        &.center{
            text-align: center;
        }
        img{
            display: inline-block;
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 100%;
    
        }
    }
    
    
    myimage

提交回复
热议问题