How To Split A Html Table By Columns For Responsive Design
We've checked the web and SO for a solution to this, but have found nothing to solve our specific problem. We are using the following table format for a contact formular: Using me
Solution 1:
Yes but not purely in CSS alone. You could restructure the table so that column 1 and 2 are nested within a table, and column 3 and 4 are nested within a table. If you restuctured the table as such, you could create a media query to assign each of the two tables display block, so the table to the right would wrap under the table on the left.
tabletable { display:inline-block;vertical-align:top; }
<tableborder="1"><tr><tdclass="wrap"><tableborder="1"><tr><tdcolspan="2">COL1-2</td></tr><tr><td>COL1</td><td>COL2</td></tr><tr><td>COL1</td><td>COL2</td></tr><tr><td>COL1</td><td>COL2</td></tr></table><tableborder="1"><tr><tdcolspan="2">COL3-4</td></tr><tr><td>COL3</td><td>COL4</td></tr><tr><td>COL3</td><td>COL4</td></tr><tr><td>COL3</td><td>COL4</td></tr></table></td></tr></table>
table table { display: block; }
to wrap.
Post a Comment for "How To Split A Html Table By Columns For Responsive Design"