Nicolas Frbezar Nicolas Frbezar - 8 months ago 16
HTML Question

CSS trouble to display a php generated HTML array

I have trouble with my CSS. I'm trying to correctly display this kind of array :

I think the problem is maybe right there :

table {
display: table;
margin : auto;

border-spacing: 2px;
border-color: gray;

table td{
font-size: 8pt;

background-color: #C7C7C7;

td, th {
display: table-cell;
vertical-align: inherit;
width: auto;
border: 1px solid gray;
border-collapse : collapse;
margin-left: 5px;
margin-right: 5px;

As i know, everything worked as well before, and i don"t know how to fix this. How can i fix my problem ?


In your JSFiddle you have applied display: block; to the td element. If you remove this then the table displays as it should.