How is a CSS “display: table-column” supposed to work?

The CSS table model is based on the HTML table model http://www.w3.org/TR/CSS21/tables.html A table is divided into ROWS, and each row contains one or more cells. Cells are children of ROWS, they are NEVER children of columns. “display: table-column” does NOT provide a mechanism for making columnar layouts (e.g. newspaper pages with multiple columns, where … Read more

space between divs – display table-cell

You can use border-spacing property: HTML: <div class=”table”> <div class=”row”> <div class=”cell”>Cell 1</div> <div class=”cell”>Cell 2</div> </div> </div> CSS: .table { display: table; border-collapse: separate; border-spacing: 10px; } .row { display:table-row; } .cell { display:table-cell; padding:5px; background-color: gold; } JSBin Demo Any other option? Well, not really. Why? margin property is not applicable to display: … Read more

CSS Cell Margin

A word of warning: though padding-right might solve your particular (visual) problem, it is not the right way to add spacing between table cells. What padding-right does for a cell is similar to what it does for most other elements: it adds space within the cell. If the cells do not have a border or … Read more

How to specify table’s height such that a vertical scroll bar appears?

Try using the overflow CSS property. There are also separate properties to define the behaviour of just horizontal overflow (overflow-x) and vertical overflow (overflow-y). Since you only want the vertical scroll, try this: table { height: 500px; overflow-y: scroll; } EDIT: Apparently <table> elements don’t respect the overflow property. This appears to be because <table> … Read more