HTML :td
Jose Lerebours
fp at fpgroups.com
Thu Aug 21 12:40:34 PDT 2008
Fairlight wrote:
> On Thu, Aug 21, 2008 at 11:24:24AM -0700, Enrique Arredondo may or may not have
> proven themselves an utter git by pronouncing:
>
>> How can I specify with :td to wrap every 20 characters ?
>>
>> html id :td :wi "20" :zz "WRAP" ?
>>
>
> No.
>
> Widths of table cells are either pixels, or if a percent sign is appended
> (ie., "20%") then that percentage width of the overall innermost table
> width.
>
> To specify wrap at 20 characters, you'd need to use a fixed-width font,
> make sure the browser could not change that font size (much harder these
> days), and figure necessary pixels per character times 20. Even then, it's
> not foolproof, as the cell and table widths vary via a multi-pass algorithm
> that reconfigures width based on requested size, overflow rules, and
> composite results of multiple requested sizes (eg., if you ask for cells in
> a column to be varying sizes, the result isn't guaranteed...usually you'll
> get the largest, but it's not bankable). This multipass alogorithm is why
> tables are slow to display when large, and won't display at all until the
> entire table is received in the data stream.
>
> You could try to put a DIV in the cell that goes by fixed width font and
> pixel count, but again, no guarantees--most browsers can override font
> family, name, size, etc.
>
> TTBOMK, there is no foolproof way to guarantee your desired result, short
> of using form elements like: <INPUT TYPE="TEXT" SIZE="20" MAXLENGTH="20">
>
> mark->
>
What about using <div> within <td> and set the <div> to desired width?
If a layer is given a fixed width,
it will not expand and force text to wrap. Of course, you then have to
set height: auto; for the layer so that
if you require too many lines, the layer expands accordingly.
One thing that might be worth mentioning is that when you show a cell
with multiple lines, adjecent cells
may need to be given a valign="top" to keep single line cells nicely set
and displaying content on top and
not centered (vertically) within the cell.
I have never attempted to use filePro HTML commands and so will not dare
try to suggest syntax here.
I noticed a post where HTML :tx seems to be a good way to do it.
Hope this helps!
--
Jose Lerebours
More information about the Filepro-list
mailing list