Why does div display:table-row ignore margin ?
If you have HTML div elements next to each other with display: table-cell; and you want to set margin between them then there will be no effect of margin.
Output: We can conclude from the above example that margin property is not affecting our output.
The margin property applies to all elements except elements with table display types other than table-caption, table, and inline-table. In simple words, we can say that margin property is not applicable on display: table-cell elements. When you will read further about this, you will get to know that the padding property does not create space between the edges of the cells. Now, the question will arise in our mind that how we will use margin property?
There are different methods with which we can set margin property in tables.
Example: We can use margin property by using the border-spacing property. Remember it should be applied to a parent element with a display : table layout and border-collapse : separate.
Output: It is concluded from this example that you can set margin property in this way.
Example: The second method to use the margin property in inner divs.