HTML :td
Bruce Easton
bruce at stn.com
Thu Aug 21 17:06:03 PDT 2008
Jose Lerebours wrote Thursday, August 21, 2008 4:33 PM:
>
> Bruce Easton wrote:
> > Jose Lerebours wrote Thursday, August 21, 2008 3:41 PM:
> >
> >> 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.
> >>
> >
> > I don't think you need div to do that under td - I think you
> > should just be able to control from the td (let's say you
> > want a td width of 300px):
> >
> > html id :td :zz "style='width:300px'" :tx "My text"
> >
> > or something like that - I only use :tx so I'm not sure of the
> > fp html syntax above, so I would just write:
> >
> > html id :tx "<td style='width:300px'>My text</td>"
> >
> > But, of course, this only gives better control of the width
> > of the td, and does not address guaranteed breaking of text
> > after a certain number of source characters, I addressed
> > in previous post.
> >
> >
>
> You are right, you do not need to use layers since you could simply set
> your cell to a fixed width and get the same wrapping effect. In the
> same token, inserting a bunch of breaks every 20 chars is going to cause
> unexpected results when browsers are set with text size larger
> than normal.
>
> You may end-up with lines showing like:
> This is the first
> line
> This is the secon
> d line
> This is the third
> line
> This is the forth
> line
>
[..]
>
> As you can see, using <br /> is not a good design practice.
>
> --
> Jose Lerebours
>
Yes, I avoid it as well for most applications - we should
have asked Enrique more about what type of info he was trying
to display. Based on the 'every 20 chars,' I assumed he was
trying to break up a specific string of non-blank characters,
but he did say 'wrap' which very well may indicate he was OK
with the browser choosing when to break.
Bruce
Bruce Easton
STN, Inc.
More information about the Filepro-list
mailing list