Nicolas Frbezar Nicolas Frbezar - 1 year ago 60
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 ?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download