Quote:
Originally Posted by weberr
Yes, thank you for the tutorial article. It is excellent, but of limited value as they only use examples using short text strings/values which works fine for short string data -- but falls apart when using long-strings. I need a way for the columns to adjust to fixed equal widths and for the text to wrap-around within that fixed width, no matter how long that may make that particular. Also, vertical-align:top, the other columns also stay fixed.
I know this has been addressed in many forums, including this one, but none of the tutorials or examples address all aspects.
I am in the epub environment. I want a table that will adjust dependent on the ebook reader/user's choice re font size or table width. But the kicker is that the first column will hold fixed length, short reference numbers, while the remaining columns will contain long text strings (paragraphs) but adjust to equal widths -- such as column 1 set at 10% and the remaining columns setting themselves to equal widths dependent on how many columns, but all add up to 100%.
Everything I have seen address the objective with a relatively non-complex code, but all assume - and the solution only works if the data going into the remaining columns is no more than the algorithm-determined width. But all fall apart if the data going into those columns is longer than the column width whereas I want an unknown amount of text (paragraphs) going into those columns. Every approach I have tried -- table-layout or not, percentages or pixels, css or html or both -- fails.
Hope someone has figured out how to this -- have a solution that works with long, wrap-around text?
|
It's just one of those, "you can't have it all ways" scenarios. You can have a column with set widths--as Ruben explained. A Table that's, say, 80% of the screensize, and then columns set within that are X percent of the now-100% width of the column. These certainly do facilitate word-wrapping (albeit, you may have to ensure that hyphenation is set to "on" to get clean breaking). Assuming I understand what you're saying properly, I'm not sure I am following what you think the issue actually
is, in the final analysis. And the tables will adjust, somewhat (within the limits, bear this in mind) of the font-size changes.
Perhaps you could post some exemplars here, along with a) samples of the code; b) screenshots of your results, and c) screenshots or roughs of what it is you wish to achieve with the resulting final table, both before and after a font-size-change. Maybe I'm going bonkers, but I'm pretty sure that we make tables with adjustable size columns with wrapping text pretty darned often. So: can you help us out with more details, as requested? To be sure we're all on the same page?
Hitch