Responsive tables

后端 未结 4 1568
闹比i
闹比i 2021-01-06 17:06

I am trying to get the table data I\'m working on responsive in a way which I don\'t think is possible as far as I know, unless other people here think it is?

Basica

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-06 17:53

    Yes it's possible. Set the TD elements to float left and set min-width

    http://jsfiddle.net/RnmLF/1/

    Just change the size of the container to see it working.

    I would look into whether or not you need to use a table though. Tables are only used for displaying tabular data these days (we are not in the 90's any more)

    EDIT

    I took the liberty to provide a NON table version for accessibility (see @timmied for the reasons why)

    http://jsfiddle.net/nW2hx/

提交回复
热议问题