Search code examples
csstwitter-bootstrapbootstrap-table

Table cell width wider than cells content


I don't understand why is table cells width wider than cell's content.

I would like to have width of column Artikel aligned with content. What I've already tried is set th width - but this is fixed and it doesn't align with content. Is there any other solution?

My example is here

enter image description here


Solution

  • That is because of the class table from bootstrap.min.css which is as below.

    .table {
        width: 100%;
        margin-bottom: 20px;
    }
    

    So if you remove the table class the results is as needed.

    Codepen Demo