HighDots Forums  

How to wrap text in <p> tag if the text has no spaces and is verylong

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss How to wrap text in <p> tag if the text has no spaces and is verylong in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
removeps-groups@yahoo.com
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is verylong - 04-06-2008 , 10:34 AM






On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Quote:
Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.
Sorry, maybe I should have said this in the first post. However, the
problem (of having enormously long words) could occur in other
contexts. Many editors like VI and MSWord do wrap words longer than
one line, so I thought CSS might have a property you can set on a div
to enable this. Maybe they should add a a property "wrapAt" whose
default value is "space" but can be "all". Right now it's as if there
is a <wbr> after every space, so with "all" there would be a <wbr>
after every character.

But you give me an idea -- maybe I can use "overflow:scroll".


Quote:
And why would the URL matter? It's available in the address bar anyway.
No, the address bar will show "http://www.mywebsite.com/errors/
404.jsp", whereas I want to echo what the user typed. This is just to
show them what they typed so that they can see the typo and fix it.
Seems more user friendly to me.


Quote:
If you really wish to display it, study the URL specs for "URI in
context" and some Style Guide for rules on admissible breaks in URLs "in
context", and implement the strategy server-side (assing <wbr> at
suitable places and doing something the _prevent_ line breaks after
hyphens).
Thanks, I'll look into this.


Reply With Quote
  #12  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-06-2008 , 01:39 PM






Scripsit removeps-groups (AT) yahoo (DOT) com:

Quote:
On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.

Sorry, maybe I should have said this in the first post.
There's really no "maybe" in either of my statements.

Quote:
However, the
problem (of having enormously long words) could occur in other
contexts.
Who cares? Different situations call for different solutions.

Quote:
Many editors like VI and MSWord do wrap words longer than
one line,
Maybe. That has little if anything to do with CSS.

Quote:
so I thought CSS might have a property you can set on a div
to enable this. Maybe they should add a a property "wrapAt" whose
default value is "space" but can be "all".
"Maybe" the situation is far more complicated.

IE recognizes a nonstandard CSS property that effectively allows any
breaks. It's not useful, because you seldom want to make all breaks
allowed and because other browsers won't recognize the property.

Quote:
Right now it's as if there
is a <wbr> after every space,
No, it's more complicated. But why do you care? URLs are not allowed to
contain whitespace.

Quote:
But you give me an idea -- maybe I can use "overflow:scroll".
"Maybe" it's a _bad_ idea. I mentioned the CSS feature to emphasize how
far from your problem CSS currently is.

Quote:
And why would the URL matter? It's available in the address bar
anyway.

No, the address bar will show "http://www.mywebsite.com/errors/
404.jsp",
That's absurd, even if you really own the mywebsite.com domain (which
actually exists).

The address bar should show the URL requested by the client. Don't mess
around with it. It's absurd to break something and then try to construct
a plastic imitation, running into endless trouble.

To be honest, my 404 error page echoes the URL, and I don't really care
if it does not fit into the available width. The user may have to
scroll, but why would I set up some _separate_ scrolling mechanism with
overflow: scroll (or overflow: auto, which makes much more sense)?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #13  
Old   
dorayme
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-06-2008 , 01:48 PM



In article <eN8Kj.322215$rR7.99229 (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Quote:
Scripsit removeps-groups (AT) yahoo (DOT) com:

On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.

Sorry, maybe I should have said this in the first post.

There's really no "maybe" in either of my statements.
No, of course not, you want unconditional surrender, and to humiliate at
every opportunity. You really are quite a bastard!

--
dorayme


Reply With Quote
  #14  
Old   
Ed Mullen
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and isvery long - 04-06-2008 , 11:38 PM



dorayme wrote:
Quote:
In article <eN8Kj.322215$rR7.99229 (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Scripsit removeps-groups (AT) yahoo (DOT) com:

On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.
Sorry, maybe I should have said this in the first post.
There's really no "maybe" in either of my statements.

No, of course not, you want unconditional surrender, and to humiliate at
every opportunity. You really are quite a bastard!

Thank you. Much more succinct than one of my rants in response to his
sometimes egregious behavior.

--
Ed Mullen
http://edmullen.net
Why do they call it the Department of Interior when they are in charge
of everything outdoors?


Reply With Quote
  #15  
Old   
dorayme
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-06-2008 , 11:53 PM



In article <d9adnZl-876pOGTanZ2dnUVZ_jCdnZ2d (AT) comcast (DOT) com>,
Ed Mullen <ed (AT) edmullen (DOT) net> wrote:

Quote:
dorayme wrote:
In article <eN8Kj.322215$rR7.99229 (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Scripsit removeps-groups (AT) yahoo (DOT) com:

On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.
Sorry, maybe I should have said this in the first post.
There's really no "maybe" in either of my statements.

No, of course not, you want unconditional surrender, and to humiliate at
every opportunity. You really are quite a bastard!


Thank you. Much more succinct than one of my rants in response to his
sometimes egregious behavior.
Just a momentary flash of anger at 4.30am. Nothing to worry about. I
still get my coffee and Finnish croissants in his killfile every morning
without fail. This morning he came in with a big grin and "Hello
dorayme, its the bastard with the morning refreshments..." And we had
our usual cordial chat.

--
dorayme


Reply With Quote
  #16  
Old   
Ed Mullen
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and isvery long - 04-07-2008 , 12:03 AM



dorayme wrote:
Quote:
In article <d9adnZl-876pOGTanZ2dnUVZ_jCdnZ2d (AT) comcast (DOT) com>,
Ed Mullen <ed (AT) edmullen (DOT) net> wrote:

dorayme wrote:
In article <eN8Kj.322215$rR7.99229 (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Scripsit removeps-groups (AT) yahoo (DOT) com:

On Apr 6, 6:27 am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Well, why didn't you tell that in your first posting, and why do you
_still_ fail to try to find the right group? CSS has nothing to offer
you but overflow handling.
Sorry, maybe I should have said this in the first post.
There's really no "maybe" in either of my statements.
No, of course not, you want unconditional surrender, and to humiliate at
every opportunity. You really are quite a bastard!

Thank you. Much more succinct than one of my rants in response to his
sometimes egregious behavior.

Just a momentary flash of anger at 4.30am. Nothing to worry about. I
still get my coffee and Finnish croissants in his killfile every morning
without fail. This morning he came in with a big grin and "Hello
dorayme, its the bastard with the morning refreshments..." And we had
our usual cordial chat.

I'm glad you have such a cordial relationship with him. I find his
attitude and demeanor supercilious and repugnant.

Knowledge does not excuse rudeness. Nor does it excuse the purveyor of
such from anything including dismissal.

That his comments sometimes include knowledge? I don't care. Nor, I
understand, does he.

So, we are at a stalemate. I ignore him constantly to my possible
detriment. And I don't care. I can find his knowledge elsewhere
without the cost of his vitriol. Rudeness is never justified. I know,
I have been guilty of that sin as well.

On the other hand, shit, it's just computer "stuff," eh? Not any life
or death issues. So, I shouldn't care, I suppose.

But assholes annoy me. Yes, yes, everyone, including I, have one, I
know that. I just don't shove mine in peoples' faces every chance I
get. He does and that is rude.

Sadly, it diminishes his effectiveness and the usefulness of his
content. So, he's being counter-productive. Which is just silly given
his penchant for dishing out "wisdom."

Oh well.

--
Ed Mullen
http://edmullen.net
Does the name Pavlov ring a bell?


Reply With Quote
  #17  
Old   
dorayme
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-07-2008 , 12:24 AM



In article <8ZOdnaAOv8CpNmTanZ2dnUVZ_ualnZ2d (AT) comcast (DOT) com>,
Ed Mullen <ed (AT) edmullen (DOT) net> wrote:

Quote:
I'm glad you have such a cordial relationship with him. I find his
attitude and demeanor supercilious and repugnant.
It worries me, Ed, that if I pipe up occasionally on this theme it will
get you all fired up. Please, don't upset yourself. Leave things to me.
JK is my responsibility. I am here on earth and my role is to absorb all
the suffering and humiliation for everyone else so that they can be free
and happy. So go and be happy. Leave me to do my noble job.

Now, shall I go back to my work or shall I take another enjoyable romp
into the CSS 2.1 Appendix E? I will decide after I post this. Leave it
to me.

--
dorayme


Reply With Quote
  #18  
Old   
removeps-groups@yahoo.com
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is verylong - 04-07-2008 , 01:01 AM



On Apr 6, 11:48 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

No, of course not, you want unconditional surrender, and to humiliate at
every opportunity. You really are quite a bastard!
Just browsing I found a new properties in CSS 3 "text-wrap" and "word-
wrap".

http://www.w3.org/TR/css3-text/#text-wrap

The word wrap thing works in IE 7, but not Firefox 5or Opera 9.26.

<body style="word-wrap:break-word">
LongLongLongLongLongLongLongLongLongLongLongLongLo ngLongLongLongLongLongLongLongLongLongLongLongLong LongLongLongLongLongLongLongLongLongLongLongLongLo ngLongLongLongLongLong
</body>
</html>

BTW, "text-wrap:unrestricted" did not work in IE 7 -- the description
of it sounds like it does the same thing as word-wrap:break-word, but
I'm probably reading something wrong.

This word-wrap is in the MSDN web pages at
http://msdn2.microsoft.com/en-us/lib...86(VS.85).aspx, so I
guess they support this property of CSS 3.

Anyway, this "monstrosity" seems important enough that someone put new
properties into CSS 3.


Reply With Quote
  #19  
Old   
Petr Vileta
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-07-2008 , 09:20 PM



removeps-groups (AT) yahoo (DOT) com wrote:
Quote:
On Apr 4, 10:50 am, Jim Moe <jmm-list.AXSPA... (AT) sohnen-moe (DOT) com> wrote:
On 03/29/08 03:45 pm,removeps-gro... (AT) yahoo (DOT) com wrote:> How to wrap
text in <p> tag if the text has no spaces and is very

The above line is so long that it ought to wrap. But because it has
no spaces, it does not wrap. [...]

Why would it wrap? There are no spaces. Who cares what an editor
does? Perhaps if you gave some context for such a ridiculously
long line, we could offer a sensible solution.

I'm writing a 404 error page in JSP that says we could not find the
URL you entered. It writes out the URL, and unfortunately the URL is
longer than the screenwidth and is clipped off.
Well, you use script to generate it so you can use some like this
(betwenn <nobr> and </nobr> it is single line)

<nobr>http://domain.com/<wbr>some_very_large_<wbr>text_here/<wbr>and_some_other_<wbr>here</nobr>

--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>



Reply With Quote
  #20  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: How to wrap text in <p> tag if the text has no spaces and is very long - 04-09-2008 , 04:19 AM



Scripsit removeps-groups (AT) yahoo (DOT) com:

Quote:
On Apr 6, 11:48 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

No, of course not, you want unconditional surrender, and to
humiliate at every opportunity. You really are quite a bastard!
Do you really want to comment on a person who insults others in public,
hiding behind a fake name like a coward? Do you really want to quote his
or her rude personal attacks and false accusations? Was it necessary for
your purposes?

Quote:
Just browsing I found a new properties in CSS 3
You might start from checking "CSS caveats". Google for it.

Quote:
"text-wrap" and "word-wrap".
Then consider whether such "free" splitting is adequate for the purpose
described in the discussion, namely presenting URLs. Hint 1: Check the
recommendations for "URI in context". Hint 2: It surely isn't.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.