Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11781

What will happen when i set display:block to table

$
0
0

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>

Viewing all articles
Browse latest Browse all 11781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>