Take the 2-minute tour ×  Given a HTML table with some data that
may be either narrower or wider than the browser window,  In the
former case I know how to make it expand to fill the full width.
In the latter case, how do you make it squash (by truncating
some columns, not by wordwrap) to fit within the available
width?  share|improve this question  4 Answers 4  up vote 1 down
vote accepted  Well, your question is difficult to answer. The
easiest way I think for doing that is using Yahoo User Interface
Library, it has a component (among many others) called DataTable
in which you can programmatically add or remove columns. Here's
an example that may help you.  PS: Check the other components,
YUI uses just javascript and some of them are really cool.
share|improve this answer  If by "truncating some columns" you
mean truncating their contents, you can always make all TDs
overflow: hidden, with a fixed height.  If, on the other hand,
you want to get rid of columns altogether, then you´ll need a
JavaScript solu