I know there was an issue with the -width parameter that was dealt with in this latest release. I tried it out on one of my smaller tables, and it seemed to work okay. I have another table, however, with a great many more columns, where it does not seem to work. Regardless of the width parameter I set, the columns are all bunched up (see below). So I am curious, is there a max width to the entire table that my column widths need to fit into? For example, if I set one to 100, do I need to pare down others to allow it to fit?
When I include truncate, it seems to work correctly.
And you can see what we are doing is setting the column width and max-width to the number of pixels you specify. For example, I set 25, so it’s 25 pixels.
After some more testing it seems in Chrome it is not following the width. In Firefox it works like I would expect. I am also seeing the overflow issue in Firefox but not Chrome.
I’m also seeing trouble on an existing table that is not using -width or -truncate. The columns seem to wind up with random widths. If I remove the “max-width: 0px” My table returns to its prior glory. Was the ‘Max-Width’ style introduced in 1.5.11?
Just curious about this, so don’t hesitate to shut me down if I sound crazy Would it be possible to configure an auto-size for columns, so that it takes the length of the string populating it and sets the width? Not even sure if there is a good correlation between string length and pixels.
The browser is attempting to organize stuff based on the string length but when it overflows the width it starts to break up the strings into new lines. With strings that dont have spaces, it won’t automatically break those up and that causes those columns to push out the width of their columns.
There are a couple things we can do. I think the easiest would be to make width accept a percentage rather than pixel because as you mention, it’s hard to associate a pixel amount to a string length.
The other thing we could do is adjust the line\word break options to prevent strings from breaking on spaces or enable breaking long strings on any character.
I’ll futz around with it to see if I can find some sane defaults that work a bit better while providing either some options or examples on how to exercise some control. It may come down to examples using UDStyle to achieve the best result for all possible cases.