How to replace a table with li tags?

I just want to order some li tags just like with this code

<table> <tr> <td colspan='2' rowspan='2'> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> 

For the reason of the jQuery script, I cannot use the table, only the list, but I want to display it the same way as with the table.

So, I do not know which of the theses properties I should use:

built-in block, block, inline

+4
source share
1 answer

As the comments say: display: table-cell is the key. The layout you requested should look something like this:

 <ul style="display: table;"> <li style="display: table-row;"> <ul> <li style="display: table-cell;"></li> ... </ul> </li> ... </ul> 
+3
source

Source: https://habr.com/ru/post/1398543/


All Articles