473,322 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

wordwrapping in mozilla

hi all,

how to wordwrap the text in a division in mozilla ..
In ie, i am using the style word-wrap:break-word it did nt work for
mozilla..

any help???

thanx in advance ,

Nov 21 '06 #1
20 3572
Scripsit Prasad:
how to wordwrap the text in a division in mozilla ..
Please start by asking your real question (not an assumed solution like
"wordwrap") and illustrate it with a URL.
In ie, i am using the style word-wrap:break-word it did nt work for
mozilla..
Did that surprise you? Why?

Anyway, if you wanted to use word-wrap: break-word, you wanted Procrustean
division into lines: break anything to make line length fit, and don't tell
anyone what you have broken. If that's your assumed solution, I'm afraid of
asking what problem might possibly justify such a monstrosity. Thank &Deity;
there is no Mozilla counterpart to that proprietary IE idiosyncracy.

So what would you like to break and why? Did I mention that a URL would be
nice?

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

Nov 21 '06 #2

Jukka K. Korpela wrote:
Scripsit Prasad:
how to wordwrap the text in a division in mozilla ..

Please start by asking your real question (not an assumed solution like
"wordwrap") and illustrate it with a URL.
What do u mean by this???
In ie, i am using the style word-wrap:break-word it did nt work for
mozilla..

Did that surprise you? Why?

Anyway, if you wanted to use word-wrap: break-word, you wanted Procrustean
division into lines: break anything to make line length fit, and don't tell
anyone what you have broken. If that's your assumed solution, I'm afraid of
asking what problem might possibly justify such a monstrosity. Thank &Deity;
there is no Mozilla counterpart to that proprietary IE idiosyncracy.

So what would you like to break and why? Did I mention that a URL would be
nice?
What URL are u asking about????????
>
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Nov 21 '06 #3
"Prasad" <pr*******@gmail.comwrites:
Jukka K. Korpela wrote:
>Scripsit Prasad:
how to wordwrap the text in a division in mozilla ..

Please start by asking your real question (not an assumed solution like
"wordwrap") and illustrate it with a URL.

What do u mean by this???
First off, it's spelled "you", not "u".

Jukka is describing what's commonly called an "A/B Problem".

That is, you want to solve problem "A", and you've decided that method "B"
is the best way to go about it, so you ask how to do "B".

The problem is that "C" may be a better way to solve "A", but if you ask
about "B" instead of "A", you may never find out about "C".
What URL are u asking about????????
When posting to this group, it's customary to provide a URL to the page
you're having trouble with.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 21 '06 #4

Sherm Pendley wrote:
"Prasad" <pr*******@gmail.comwrites:
Jukka K. Korpela wrote:
Scripsit Prasad:

how to wordwrap the text in a division in mozilla ..

Please start by asking your real question (not an assumed solution like
"wordwrap") and illustrate it with a URL.
What do u mean by this???

First off, it's spelled "you", not "u".
:-O , =))
i usually write so for fast typing .. take it easy . and write for
making others to understand what i am saying . and u understood what i
mean ..
>
Jukka is describing what's commonly called an "A/B Problem".
You can use first person here naaa :-??

That is, you want to solve problem "A", and you've decided that method "B"
is the best way to go about it, so you ask how to do "B".

The problem is that "C" may be a better way to solve "A", but if you ask
about "B" instead of "A", you may never find out about "C".
ah! My real question is to know how to wordwrap text .
what did i ask ???
What URL are u asking about????????

When posting to this group, it's customary to provide a URL to the page
you're having trouble with.
But is it necessay always??
>
sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 21 '06 #5
"Prasad" <pr*******@gmail.comwrites:
Sherm Pendley wrote:
>"Prasad" <pr*******@gmail.comwrites:

First off, it's spelled "you", not "u".
:-O , =))
i usually write so for fast typing ..
This isn't a race. Slow down and learn how to spell. While you're at it,
try a new keyboard - your shift key appears to be broken.
>That is, you want to solve problem "A", and you've decided that method "B"
is the best way to go about it, so you ask how to do "B".

The problem is that "C" may be a better way to solve "A", but if you ask
about "B" instead of "A", you may never find out about "C".
ah! My real question is to know how to wordwrap text .
what did i ask ???
You asked about your proposed solution to the problem you're having - not
about the actual problem.

Word-wrapping in the browser is unreliable at best - using proprietary
single-browser attributes to do it is even more so. So if you tell us what
problem you think word-wrapping is the solution for, we may be able to tell
you about a better solution.
>When posting to this group, it's customary to provide a URL to the page
you're having trouble with.

But is it necessay always??
Yes. We can't tell you what's wrong with code you didn't show us.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 21 '06 #6
Prasad wrote:
Sherm Pendley wrote:
>First off, it's spelled "you", not "u".

:-O , =))
i usually write so for fast typing .. take it easy . and write for
making others to understand what i am saying . and u understood what
i mean ..
Every time my eye gets to the "u", it has to stop and translate this
non-word, thus causing the time to read to approximately double.

We are not teenagers using mobile phone text messages.

Try also to get your keyboard's Shift keys repaired. "i" is "I", and new
sentences begin with capital letters.

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 21 '06 #7
Prasad wrote:
What URL are u asking about????????

When posting to this group, it's customary to provide a URL to the page
you're having trouble with.

But is it necessay always??
If you want to avoid long unnecessary threads like this, yes.
Two reasons for an URL that demonstrates the problem you are attempting
to solve:
1. Often simply creating such a page answers the question for you.
2. We get to see the context of what you are doing, not just the bits you
think are important to the problem which, sadly, are usually not.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Nov 21 '06 #8
On 21 Nov 2006 06:07:28 -0800, "Prasad" <pr*******@gmail.comwrote:
>i usually write so for fast typing .. take it easy . and write for
making others to understand what i am saying . and u understood what i
mean ..
And, in doing so, you make yourself look like an under schooled idiot.
Learn to communicate using proper language syntax. You might have more
credibility with those readers who are more mature than yourself.
Capitalization, punctuation and spelling; and learn how to use
ellipsis correctly—these tools are your friends.

--
Zilbandy - Tucson, Arizona USA <zi*@zilbandyREMOVETHIS.com>
Dead Suburban's Home Page: http://zilbandy.com/suburb/
PGP Public Key: http://zilbandy.com/pgpkey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Nov 21 '06 #9
Prasad wrote:
hi all,

how to wordwrap the text in a division in mozilla ..
Word wrapping occurs normally in all browsers, in every paragraph that's
more than one line long. What are you talking about?
In ie, i am using the style word-wrap:break-word it did nt work for
mozilla..
Oh, you want words to *break*. Regarding word-wrap:

http://msdn.microsoft.com/workshop/a...s/wordwrap.asp

"This property is defined in Cascading Style Sheets (CSS), Level 3
(CSS3)". But Level 3 is only in draft stage and browsers only implement
portions of it experimentally. Evidentally Mozilla doesn't. (CSS 2.1 is
still in draft stage, but browsers are further along with implementing it.)

Interesting look at some CSS3 features that *are* available in some
browsers:

http://www.css3.info/preview/
Nov 21 '06 #10
Prasad wrote:
hi all,

how to wordwrap the text in a division in mozilla ..
In ie, i am using the style word-wrap:break-word it did nt work for
mozilla..

any help???

thanx in advance ,
You are trying to use a style "word-wrap". Where is that style
specified? I cannot find any CSS1 or CSS2.1 property containing "wrap".
If it's in CSS3, be very careful; much of CSS3 is not yet implemented
in any browser.

--

David E. Ross
<http://www.rossde.com/>

I use SeaMonkey as my Web browser because I want
a browser that complies with Web standards. See
<http://www.mozilla.org/projects/seamonkey/>.
Nov 22 '06 #11

Sherm Pendley wrote:
"Prasad" <pr*******@gmail.comwrites:
Sherm Pendley wrote:
"Prasad" <pr*******@gmail.comwrites:

First off, it's spelled "you", not "u".
:-O , =))
i usually write so for fast typing ..

This isn't a race. Slow down and learn how to spell. While you're at it,
try a new keyboard - your shift key appears to be broken.
That is, you want to solve problem "A", and you've decided that method "B"
is the best way to go about it, so you ask how to do "B".

The problem is that "C" may be a better way to solve "A", but if you ask
about "B" instead of "A", you may never find out about "C".
ah! My real question is to know how to wordwrap text .
what did i ask ???

You asked about your proposed solution to the problem you're having - not
about the actual problem.

Word-wrapping in the browser is unreliable at best - using proprietary
single-browser attributes to do it is even more so. So if you tell us what
problem you think word-wrapping is the solution for, we may be able to tell
you about a better solution.
Thanks for making me understood what everyone is trying to explain me
..
Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the line
is not being broken and the width of the space occupying by the
division is increasing ..

I don't want to happen so ..

So what should I ?
>
When posting to this group, it's customary to provide a URL to the page
you're having trouble with.
But is it necessay always??

Yes. We can't tell you what's wrong with code you didn't show us.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 22 '06 #12
"Prasad" <pr*******@gmail.comwrites:
Thanks for making me understood what everyone is trying to explain me
No - thank *you* for taking the explanation as it was intended, as an attempt
to help. Not everyone does.
Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the line
is not being broken and the width of the space occupying by the
division is increasing ..

I don't want to happen so ..

So what should I ?
A situation like you describe is most often not handled in the browser, but
instead handled on the server.

Most often, it's handled when the text is input. For instance, if you have
a content-management system that allows users to displays URLs, and uses
the URL itself as the display text. A very long URL - for example, a link
to a product at Amazon - can result in what you describe here.

In that case, the CMS would handle the text as its being entered, using
whatever specific rules you've created. For instance, URLs longer than 80
characters may have a space added to them, or maybe have the query string
removed for display purposes (but not for the href attribute).

The point of all that is simply that browsers, aside from having unreliable
support for proprietary word-wrapping suggestions in the first place, use
"generic" wrapping rules even when they do make an attempt. They don't
understand hyphenation or abbreviation, for instance. By applying the word-
wrapping on the server, as text is being entered, you gain the chance to
choose rules that are appropriate to your data.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 22 '06 #13
Prasad wrote:
Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the line
is not being broken and the width of the space occupying by the
division is increasing ..

I don't want to happen so ..

So what should I ?
This is a long-standing problem with the Mozilla family of browsers. I
filed a bug report years ago, but it is not being worked on:

<https://bugzilla.mozilla.org/show_bug.cgi?id=95067>

Internet Explorer has never had this problem. Opera and Safari used to
have this problem, but they fixed it after I filed bug reports.

As far as I know, the only solution is to detect Mozilla browsers and
add <brtags at suitable intervals.

--
Alan Wood
http://www.alanwood.net (Unicode, special characters, pesticide names)

Nov 22 '06 #14
Alan Wood schrieb:

[line-break should be allowed after hyphens]
<https://bugzilla.mozilla.org/show_bug.cgi?id=95067>

Internet Explorer has never had this problem. Opera and Safari used to
have this problem, but they fixed it after I filed bug reports.

As far as I know, the only solution is to detect Mozilla browsers and
add <brtags at suitable intervals.
Thomas Scholz suggests a workaround, which is acceptable, IMHO.

http://scholz-webdesign.de/css/demo/...zeilenumbruch/

<p style="width:10em;border:2px solid #99a2ac"
Webseiten-<span class="moz-break"
</span>Oberflächenspannung<p>

/* Neccesary and "visible" only for Browsers of the Mozilla family */
body:-moz-last-node .moz-break::before {
content: "\200B"; /* Whitespace without width */
letter-spacing: -1ex;
}

Andreas
--
http://borumat.de/dreamweaver-html-editor-tipps
http://borumat.de/html-und-css-tipps
http://borumat.de/php-tipps-und-skripte
http://borumat.de/firefox-browser-tipps
Nov 22 '06 #15
On 21 Nov 2006 21:39:07 -0800, "Prasad" <pr*******@gmail.comwrote:
>
Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the line
is not being broken and the width of the space occupying by the
division is increasing ..

First, DIVs are not suitable for such a use, they are for grouping
elements, not displaying paragraphs. <pis for that.
>I don't want to happen so ..
As it happens the solution is the same in both cases. Give the element
an explicit width with CSS. A block element will expand to the full
width of it's containing element unless it is floated, positioned, or
given a width. Usually most appropriate is a width defined in em units
(em) or percentages (%), not pixels (px) and certainly not points (pt).

Nov 22 '06 #16
Scripsit Alan Wood:
Prasad wrote:
>Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the
line is not being broken and the width of the space occupying by the
division is increasing ..

I don't want to happen so ..

So what should I ?

This is a long-standing problem with the Mozilla family of browsers.
"This"? Not breaking words is how browsers have haved since the dawn of the
web, and it was specifically described in the good old HTML 2.0
specification, a great improvement in clarity over its successors. It would
be nice if browsers started doing _correct_ word division, but we know how
tough _that_ is.

Breaking strings at arbitrary points is a problem. Not breaking is not.
Authors are expected to live with the fact that browsers are kinda stupid in
text formatting.
I filed a bug report years ago, but it is not being worked on:

https://bugzilla.mozilla.org/show_bug.cgi?id=95067
You're complaining about not breaking after a hyphen (technically,
hyphen-minus). It was inappropriate to file it as a bug. It is at best a
request for a feature. Besides, what made you think that there are any
hyphens in the string? "This" was a vaguely described "problem" saying that
a string should be broken somehow. (It seems to call for the response "try
<dwimtags".)
Internet Explorer has never had this problem.
_It_ has a problem. It breaks after a hyphen indiscriminately, even in "a-b"
or in "-a".
As far as I know, the only solution is to detect Mozilla browsers and
add <brtags at suitable intervals.
Browser sniffing is part of a problem, and so is throwing in <br>.

Using <wbrafter a hyphen, if you know that there's an acceptable breaking
point, is efficient enough and quite harmless, except that it triggers a
chorus of whining "but it's not standard!".

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

Nov 22 '06 #17
Prasad wrote:
i usually write so for fast typing
There's one of you and dozens of us. Write for fast *reading* as there are
more people reading your message than writing it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Nov 22 '06 #18

Sherm Pendley wrote:
"Prasad" <pr*******@gmail.comwrites:
Thanks for making me understood what everyone is trying to explain me

No - thank *you* for taking the explanation as it was intended, as an attempt
to help. Not everyone does.
Actually what I wanted to have is :
When a div contains a line of text without any white spaces ,the line
is not being broken and the width of the space occupying by the
division is increasing ..

I don't want to happen so ..

So what should I ?

A situation like you describe is most often not handled in the browser, but
instead handled on the server.

Most often, it's handled when the text is input. For instance, if you have
a content-management system that allows users to displays URLs, and uses
the URL itself as the display text. A very long URL - for example, a link
to a product at Amazon - can result in what you describe here.

In that case, the CMS would handle the text as its being entered, using
whatever specific rules you've created. For instance, URLs longer than 80
characters may have a space added to them, or maybe have the query string
removed for display purposes (but not for the href attribute).

The point of all that is simply that browsers, aside from having unreliable
support for proprietary word-wrapping suggestions in the first place, use
"generic" wrapping rules even when they do make an attempt. They don't
understand hyphenation or abbreviation, for instance. By applying the word-
wrapping on the server, as text is being entered, you gain the chance to
choose rules that are appropriate to your data.
I planned to word-wrap on the server , but hesitating to do so .
Because, the text is displayed in a division ,which has width in % , on
client side ..
As different users have different client visible areas, I can n't break
my text which is suitable to all users.
Is there any way which I can use on server-side so that the data can be
fixed in a division on client side??

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Nov 23 '06 #19

Andreas Borutta wrote:
Alan Wood schrieb:

[line-break should be allowed after hyphens]
<https://bugzilla.mozilla.org/show_bug.cgi?id=95067>

Internet Explorer has never had this problem. Opera and Safari used to
have this problem, but they fixed it after I filed bug reports.

As far as I know, the only solution is to detect Mozilla browsers and
add <brtags at suitable intervals.

Thomas Scholz suggests a workaround, which is acceptable, IMHO.

http://scholz-webdesign.de/css/demo/...zeilenumbruch/

<p style="width:10em;border:2px solid #99a2ac"
Webseiten-<span class="moz-break"
</span>Oberflächenspannung<p>

/* Neccesary and "visible" only for Browsers of the Mozilla family */
body:-moz-last-node .moz-break::before {
content: "\200B"; /* Whitespace without width */
letter-spacing: -1ex;
}
If I use this style , width of the paragraph is not increasing though
it has longer text with no white space ..but the data is not being
broken and coming to new line .

Andreas
--
http://borumat.de/dreamweaver-html-editor-tipps
http://borumat.de/html-und-css-tipps
http://borumat.de/php-tipps-und-skripte
http://borumat.de/firefox-browser-tipps
Nov 23 '06 #20
21 Nov 2006 06:07:28 -0800 from Prasad <pr*******@gmail.com>:
Sherm Pendley wrote:
"Prasad" <pr*******@gmail.comwrites:
Jukka K. Korpela wrote:
>Scripsit Prasad:
>>
how to wordwrap the text in a division in mozilla ..
>>
>Please start by asking your real question (not an assumed solution like
>"wordwrap") and illustrate it with a URL.
>
What do u mean by this???
First off, it's spelled "you", not "u".
:-O , =))
i usually write so for fast typing ..
http://oakroadsystems.com/genl/unice.htm#smartEnglish

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Nov 26 '06 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Neil Zanella | last post by:
Hello, I just ran into an interesting problem with cookies while using PHP 4 and Mozilla 1.6. Basically, I have been using PHP on a site called: foo.bar.net?script.php Within that script I...
4
by: Jakub Fast | last post by:
Hi, Does anybody know how far you can get nowadays with trying to use Python as the script language for XUL instead of JS? Is it possible (even theoretically) to write full-fledged applications...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
3
by: Jim Ley | last post by:
Hi, It seems the mozilla guys have chosen another (almost certainly poor choice in my initial thoughts) of having document.all evaluate to false, but document.all catch the chicken event - also...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
0
by: Prasad | last post by:
hi all, how to wordwrap the text in a division in mozilla .. In ie, i am using the style word-wrap:break-word it did nt work for mozilla.. any help??? thanx in advance ,
20
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.