HTML CSS examples for CSS Layout:Column Layout
Change number of columns on mouseover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> table tr td.single { display: none; } table tr.single-td td.single { display: table-cell; } table tr.single-td td.multi { display: none; } </style> </head> <!--from w w w. j ava 2s.c om--> <body> <table border="1"> <tbody> <tr onmouseover="this.classList.toggle('single-td')" onmouseout="this.classList.toggle('single-td')"> <td colspan="3" class="single">ABC</td> <td class="multi">A</td> <td class="multi">B</td> <td class="multi">C</td> </tr> </tbody> </table> </body> </html>