Table is way too large. Why?

I thought that I had done this correctly, but the table is way too large

The columns are defined in %ages which appears to be read according the the “inspect element”
The table is set at 950 px which is the size of the container.

Why then should the table expand so much so that it goes way off the page?

Your table headers (th) have a min-width: 300px

1 Like

Thanks for that.

I though that the 300px was just for that one specific table. edsfor1841

Much appreciated

Take note of the commas, each comma separates a selector.

.edsfor1841 td, tr, th {}

So .edsfor1841 td selects only td’s in the class edsfor1841 then after the comma tr selects any tr and th selects any th because they are not paired with any class, id or other element.

Maybe what you expected was:-

.edsfor1841 td, .edsfor1841 tr, .edsfor1841 th {}
1 Like

I see, so if I had wanted that only to apply to that individual table it should have been

.edsfor1841 td tr th {} without commas

This indeed was what I wanted.

.edsfor1841 td, .edsfor1841 tr, .edsfor1841 th {}

That’s great

In that, the first selector is the same, but the second selector selects any th inside a tr, which is effectively any th again, as in a valid table they will always be in a tr.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.