Can you make IE 9 (or earlier) expose the table elements as if they were a regular display: block elements?

In WebKit, Firefox, and Opera, you can configure various table elements display: blockto not display as tables:

This can be useful on small screens (for example, iPhone), which do not have space for displaying tables laid out traditionally.

IE 9, however, still exposes the table cells horizontally next to each other - it does not seem to honor display: blockfor table elements.

Is there any other code that will stop IE 9 (or earlier) from placing tables as tables?

+5
source share
2 answers

float:left;clear:left; , IE 9 , . width:100%, , Chrome Firefox.

table,
thead,
tfoot,
tbody,
tr,
th,
td {
    display:block;
    width:100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    float:left;
    clear:left;
}

: "display: block" <td> IE? ?, , width:100%, . box-sizing:border-box;, .

+10

:

table,
thead,
tfoot,
tbody,
tr,
th,
td {
    float:left;
    clear: left;
}

floats

: http://jsfiddle.net/bHzsC/1/

+3

All Articles