question about wrapping a string

S

SLH

Justin Piper said:
It's a bletcherous hack of a solution, but no more so than any
alternative I can think of. You could just clip long words using
overflow: hidden, but that would hide information the visitor needs. You
can, as the OP notes, cause IE to break long words at arbitrary points,
but only IE.

You could simply allow long words to extend past the edge of the content
area. This would be the solution I would normally favor, however it is
not appropriate in all situations, as it requires that there be no other
content to the right that would be obscured. Also, special consideration
must be given to IE to avoid excessive horizontal scrolling, as it will
expand the entire content area to contain the unwrappable word.

I suppose something could conceivably be done using client-side script.
That could potentially be pretty slick, but it leaves the taste of
over-engineering in my mouth. Is there another option I've neglected?


im going to go with clipping long text. as i see it, any line that is so
long it cant be displayed properly is just an attempt to screw up my layout
or database anyway. so why worry about displaying it properly?
 
B

Bob Lehmann

just an attempt to screw up my layout or database anyway. so why worry
about displaying it properly?

Spoken like a true dumba**.

Bob Lehmann
 
D

Dave Anderson

Bob said:
Spoken like a true dumba**.

I'm not sure I completely agree, Bob. The CSS approach
"width:NNNpx;overflow:hidden" is a quick fix that cures the immediate
problem of users entering long, meaningless strings. It *does* present a
potential problem for someone who needs a huge font.

Obviously, the real cure to the problem is rejection of that text from the
beginning. But I don't think he is being entirely unreasonable in this
circumstance.



[1] Many browsers, among them Firefox, support minimum font sizes regardless
of the author's wishes.
 
B

Bob Barrows [MVP]

SLH said:
im going to go with clipping long text. as i see it, any line that is
so long it cant be displayed properly is just an attempt to screw up
my layout or database anyway. so why worry about displaying it
properly?

So why not simply reject it instead of going to the trouble of modifying
it?
 
S

SLH

i have long since implemented a function that rejects text that i determine
to be invalid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top