The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Changing table width without shrinking/stretching

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #297914


    I would like to know if it’s possible to adjust a table’s width without shrinking/stretching it. Basically, I would like to cut the table in a certain point. Let’s say I calculate through java-script the amount of columns that I want and use JQuery to get the width of all those columns. Then, I could set the width of the table to that value and cut in that exact point, removing the rest of the table. The problem is that I get this to work whenever the browser window is not wide enough to fit the table. On the other hand, if it doesn’t overflow, the table will shrink instead of what I intend to do.

    Is it possible to achieve this behavior?


    I don’t know how possible this is but then I don’t really understand what you’re wanting to achieve – maybe you should provide a series of images to illustrate?

    The thing that concerns me is that it sounds like you want to divide the table vertically, depending on screen width. This would surely destroy the relationships of the data within, and unravel the relationships again at every division breakpoint. Wouldn’t it be easier/kinder on your stats, to allow the table to scroll inside of a container on small screens. OR if the data can be divided, do it right from the start so that the tables are always small, even on larger screens?


    I don’t know how possible it. but if you make please write here. thanks


    It might not be what you mean and performance wise not the smartest thing to do, but maybe you mean something like this?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.