Nicolas Frbezar
Nicolas Frbezar

Reputation: 499

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:

https://jsfiddle.net/ju8hmgp9/

I think the problem is maybe right there :

table {
        display: table;
        width:auto;
        margin : auto;

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

    table td{
        font-size: 8pt;

    }
    .empty{
        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 ?

Upvotes: 1

Views: 46

Answers (1)

George
George

Reputation: 180

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

https://jsfiddle.net/4bx4n8fk/1/

Upvotes: 1

Related Questions