menu

arrow_back How to disable the adjustment of table width to fit the screen?

by
0 votes
Have a dynamically generated table with many columns and lots of text in the cells. The browser is so eager to push a table to the screen size that ignores the specified column width and non-breaking spaces in titles.
in the end, and the table does not fit width and cell height stretched on the floor of the screen.
Is it possible to change this behavior with css? or just to drive a fixed width in a script?

see nothing will happen - no one reads the question
the question is closed

2 Answers

by
0 votes
Well, if there's any specified column width, it will fit table-layout: fixed . Although no code is still not clear what exactly you want.

1 comment

also ignored by the browser
by
0 votes
td {
overflow: hidden;
}

Только потом не жалуйтесь)

А, вообще, можно через max-width для ячеек.

5 Comments

Dmitry play on jsfiddle, you immediately give the solution.
And so - nothing conversation.
table {
table-layout: fixed;
}
td {
overflow: hidden;
white-space: nowrap;
}
the cell is minisemester than I asked.
than all the damn reading? obviously not with the eyes
Dmitry no , just the same, I meant max-width, which prohibits the cells to occupy more space than you allowed them.
In any case, it's all empty chatter until a complete code on jsfiddle or codepen
did you mean max-heightили min-width?
in any case, it is not working.
to hide the data too.