Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Computer Support > HTML word wrap for a very long word/number.

Reply
Thread Tools

HTML word wrap for a very long word/number.

 
 
Dan
Guest
Posts: n/a
 
      02-22-2009
Hello,

I have been trying to get a one million digit number to display in a
static html page, however the number doesn't word wrap at the end of the
page it just continues on to right. It does eventually wrap and make a
new line but in sure this is just a limitation of the browser rather
than anything else.

I want the number to run down the page so there is no horizontal
scrolling at all, ideally I would like it to word wrap to whatever size
a browser is set to. Normally this would never be a problem since
paragraphs don't normally consist of such long words or numbers.

I have searched Google but to no avail.

thanks in advance.

~Dan
 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-22-2009
Dan wrote:

> I have been trying to get a one million digit number to display in a
> static html page, however the number doesn't word wrap at the end of
> the page it just continues on to right.


...which is as expected. HTML will not break up a solid word or number.

> It does eventually wrap and make a new line but in sure this is just a
> limitation of the browser rather than anything else.


What? Where does it "eventually" wrap?

> I want the number to run down the page so there is no horizontal
> scrolling at all, ideally I would like it to word wrap to whatever
> size a browser is set to. Normally this would never be a problem
> since paragraphs don't normally consist of such long words or
> numbers.


Why would you want to break a number? Surely, this: 1,000,
000 would not be desirable.

The answer might be to write a flexible web page, not constrained to
some arbitrary fixed width. You don't know how wide (or narrow) my
browser window is.

Give the URL to your test page.

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
 
 
 
Mike Easter
Guest
Posts: n/a
 
      02-22-2009
Dan wrote:

> I have been trying to get a one million digit number to display in a
> static html page, however the number doesn't word wrap at the end of the
> page it just continues on to right.


Why don't you break the number with spaces at regular intervals.

Here's pi to 1000 digits
http://www.greatplay.net/uselessia/a.../pi2-1000.html

10,000 http://www.greatplay.net/uselessia/a...pi2-10000.html


--
Mike Easter

 
Reply With Quote
 
Mike Easter
Guest
Posts: n/a
 
      02-22-2009
Beauregard T. Shagnasty wrote:
> Mike Easter wrote:


>> Here's pi to 1000 digits


>> 10,000 http://www.greatplay.net/uselessia/a...pi2-10000.html

>
> Ah. I interpreted the OP as 'using digits to present the number one
> million.' At the moment, I can't think of a reason where a web page
> would need to display a number that is actually a million digits. :-/
>
> Even pi to 10,000 is .. well .. excessive?


Oh, you think that is excessive? Actually, the site provides even
more extremes if you follow the links to more links. The 1000 digit page
is where you find the 10,000 digit link. At the 10000 page you find a
100,000; at the 100,000 you find a link to 'even more digits' -- which
page gives links for .txt files instead of html for 1 & 10 million.



--
Mike Easter

 
Reply With Quote
 
chuckcar
Guest
Posts: n/a
 
      02-22-2009
Dan <Dan@dans[REMOVETHIS]comp.net> wrote in
news:af9ol.22730$(E-Mail Removed):

> Hello,
>
> I have been trying to get a one million digit number to display in a
> static html page, however the number doesn't word wrap at the end of the
> page it just continues on to right. It does eventually wrap and make a
> new line but in sure this is just a limitation of the browser rather
> than anything else.
>
> I want the number to run down the page so there is no horizontal
> scrolling at all, ideally I would like it to word wrap to whatever size
> a browser is set to. Normally this would never be a problem since
> paragraphs don't normally consist of such long words or numbers.
>
> I have searched Google but to no avail.
>

Standard procedure for mathematicians is to group digits into fives
(without commas naturally) separated by a single space thereby making
wordwrap and appearance not a problem.

--
(setq (chuck nil) car(chuck) )
 
Reply With Quote
 
Evan Platt
Guest
Posts: n/a
 
      02-22-2009
On Sun, 22 Feb 2009 19:17:11 +0000 (UTC), chuckcar <(E-Mail Removed)>
wrote:

>Standard procedure for mathematicians is to group digits into fives
>(without commas naturally) separated by a single space thereby making
>wordwrap and appearance not a problem.


And that would help in HTML... HOW?
--
To reply via e-mail, remove The Obvious from my e-mail address.
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-22-2009
Mike Easter wrote:

> Beauregard T. Shagnasty wrote:
>> Mike Easter wrote:
>>> Here's pi to 1000 digits

>
>>> 10,000 http://www.greatplay.net/uselessia/a...pi2-10000.html

>>
>> Ah. I interpreted the OP as 'using digits to present the number one
>> million.' At the moment, I can't think of a reason where a web page
>> would need to display a number that is actually a million digits.
>> :-/
>>
>> Even pi to 10,000 is .. well .. excessive?

>
> Oh, you think that is excessive? Actually, the site provides
> even more extremes if you follow the links to more links. The 1000
> digit page is where you find the 10,000 digit link. At the 10000
> page you find a 100,000; at the 100,000 you find a link to 'even
> more digits' -- which page gives links for .txt files instead of html
> for 1 & 10 million.


I saw them. While pi to 10 million digits may be beneficial to a
mathematician, there's no other reason except maybe for fun to put such
numbers on a web page. <g>

Maybe the OP could use scientific notation instead! I'm a but rusty,
but maybe 1.0E+1000000 ? Izzat right?

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
Mike Easter
Guest
Posts: n/a
 
      02-22-2009
Beauregard T. Shagnasty wrote:
> Mike Easter wrote:


>> Oh, you think that is excessive?


> I saw them. While pi to 10 million digits may be beneficial to a
> mathematician, there's no other reason except maybe for fun to put such
> numbers on a web page. <g>
>
> Maybe the OP could use scientific notation instead! I'm a but rusty,
> but maybe 1.0E+1000000 ? Izzat right?


No, it isn't. But if (as long as) you are using scientific notation, (I
think) you get to use mathematical constants such as e (the little one -
Euler's) and such as.....

.... pi.

That is, the UTF-16 0x03C0 one, the little Greek letter. So, if you use
the right notation, you can just write the Greek letter and you don't need
all of those digits and you will have it exactly right, instead of just
very close.



--
Mike Easter

 
Reply With Quote
 
Aardvark
Guest
Posts: n/a
 
      02-23-2009
On Sun, 22 Feb 2009 15:15:14 -0800, Mike Easter wrote:

> Beauregard T. Shagnasty wrote:
>> Mike Easter wrote:

>
>>> Oh, you think that is excessive?

>
>> I saw them. While pi to 10 million digits may be beneficial to a
>> mathematician, there's no other reason except maybe for fun to put such
>> numbers on a web page. <g>
>>
>> Maybe the OP could use scientific notation instead! I'm a but rusty,
>> but maybe 1.0E+1000000 ? Izzat right?

>
> No, it isn't. But if (as long as) you are using scientific notation, (I
> think) you get to use mathematical constants such as e (the little one -
> Euler's) and such as.....
>
> ... pi.
>
> That is, the UTF-16 0x03C0 one, the little Greek letter. So, if you use
> the right notation, you can just write the Greek letter and you don't
> need all of those digits and you will have it exactly right, instead of
> just very close.


Especially if you can do your calculation such that two 'pis' cancel each
other out, leaving a good old numerical solution.



--
The month of March in this year of 2009 sees the centenary of the laying
of the keel of the most famous (or infamous) ocean liner of all time, RMS
Titanic, at Harland & Wolff shipyard in Belfast.
< http://en.wikipedia.org/wiki/RMS_Titanic>
 
Reply With Quote
 
G. Morgan
Guest
Posts: n/a
 
      02-23-2009
Dan <Dan@dans[REMOVETHIS]comp.net> wrote:

>Hello,
>
>I have been trying to get a one million digit number to display in a
>static html page, however the number doesn't word wrap at the end of the
>page it just continues on to right. It does eventually wrap and make a
>new line but in sure this is just a limitation of the browser rather
>than anything else.
>
>I want the number to run down the page so there is no horizontal
>scrolling at all, ideally I would like it to word wrap to whatever size
>a browser is set to. Normally this would never be a problem since
>paragraphs don't normally consist of such long words or numbers.


You could put the digits inside a "textarea" element.

<textarea rows="40" cols="40">
1234567890123456789
</textarea>
--

"Newspaper claims car thief transformed into a goat"
http://news.yahoo.com/s/ap/20090124/...d_goat_thief_5
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to (const __gnu_cxx::hash<long long int>) (const long long int&) veryhotsausage C++ 1 07-04-2008 05:41 PM
very very very long integer shanx__=|;- C Programming 19 10-19-2004 03:55 PM
very very very long integer Abhishek Jha C Programming 4 10-17-2004 08:19 AM
OT?: Word wrap in text files opened in MSIE (re HTML links in an html index file). fitwell HTML 2 11-13-2003 03:14 PM
can you word wrap a long pull down menu option? Joe HTML 1 09-13-2003 01:56 PM



Advertisments