Responsive tables, the smart way

前端 未结 4 1994
花落未央
花落未央 2020-11-30 12:58

I\'ve got a table that contains data. Tabular data. And it looks like this.

\"enter

4条回答
  •  一整个雨季
    2020-11-30 13:25

    You could inline block the elements. I haven't had much time to play, but something like the following:

    #content {
        border:1px solid;
        border-collapse:collapse;
    }
    #content td, #content th {
        border:1px solid;
        text-align:left;
        padding:.07em .2em;
        white-space:nowrap;
        font-weight:400;
    }
    #content td {
        display: inline-block;
        width: 100px;
    }
    

    It's not the prettiest creation, though!

    http://jsfiddle.net/8H3bN/

提交回复
热议问题