0

I am using html tables in my admin panel. Currently, when the row is large, my table spans out of the container in a small browser window:

large-row

I would like the table row not to span out of the container when it gets so small that is unable to fit s in one row. The desired behavior is that s that don't fit apper on the next line.

Can this be achieved and how?

Community
  • 1
  • 1
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174

2 Answers2

0

The behaviour you describe doesn't make sense for tables. Tables display rows of cells, it doesn't do advanced layouts.

If you don't want the table to ruin the design in a narrow browser window, set the min-width property of the body tag to something wider than the table. That way, at least the scroll bar will appear at the bottom of the window, and the design won't be ruined.

Hubro
  • 56,214
  • 69
  • 228
  • 381
0

What happens is normal. What you can do to just avoid large cells to take so much width is to apply custom css rules. For instance you can set a fixed width for the dropdown in the third cell of your table to save some space.

Nikos Tsirakis
  • 709
  • 4
  • 8