Why border-spacing and border-collapse is still working even if I set display property of table element to block. I think these properties will only work when display is table but I have changed it to block but still working. Why?
I am not expecting the border spacing to work.
Here is the code:
#tab { display: block; border: 2px solid black; } .row { display: table-row; } .data { display: table-cell; border: 2px solid; } table { border: 2px solid; display: block; } td, tr { display: block; padding: 0px; }
<div id="tab"><div class="row"><div class="data">Lorem, ipsum.</div><div class="data">Lorem, ipsum.</div></div></div><table><tr><td>Lorem, ipsum dolor.</td><td>Lorem, ipsum dolor.</td></tr></table>