FrenkyB
FrenkyB

Reputation: 7197

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

Upvotes: 1

Views: 1456

Answers (1)

Naren Murali
Naren Murali

Reputation: 56099

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

Upvotes: 2

Related Questions