1

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 ?

1 Answer 1

1

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/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.