HTML word wrap for a very long word/number.

Discussion in 'Computer Support' started by Dan, Feb 22, 2009.

  1. Dan

    Dan Guest

    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
    Dan, Feb 22, 2009
    #1
    1. Advertising

  2. 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
    Beauregard T. Shagnasty, Feb 22, 2009
    #2
    1. Advertising

  3. Dan

    Mike Easter Guest

    Mike Easter, Feb 22, 2009
    #3
  4. Dan

    Mike Easter Guest

    Beauregard T. Shagnasty wrote:
    > Mike Easter wrote:


    >> Here's pi to 1000 digits


    >> 10,000 http://www.greatplay.net/uselessia/articles/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
    Mike Easter, Feb 22, 2009
    #4
  5. Dan

    chuckcar Guest

    Dan <Dan@dans[REMOVETHIS]comp.net> wrote in
    news:af9ol.22730$:

    > 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) )
    chuckcar, Feb 22, 2009
    #5
  6. Dan

    Evan Platt Guest

    On Sun, 22 Feb 2009 19:17:11 +0000 (UTC), chuckcar <>
    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.
    Evan Platt, Feb 22, 2009
    #6
  7. Mike Easter wrote:

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

    >
    >>> 10,000 http://www.greatplay.net/uselessia/articles/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
    Beauregard T. Shagnasty, Feb 22, 2009
    #7
  8. Dan

    Mike Easter Guest

    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
    Mike Easter, Feb 22, 2009
    #8
  9. Dan

    Aardvark Guest

    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>
    Aardvark, Feb 23, 2009
    #9
  10. Dan

    G. Morgan Guest

    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/ap_on_fe_st/odd_goat_thief_5
    G. Morgan, Feb 23, 2009
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DBj

    Word Wrap

    DBj, Apr 29, 2005, in forum: Firefox
    Replies:
    4
    Views:
    6,286
    Moz Champion
    Apr 30, 2005
  2. FJDx

    word wrap problem

    FJDx, Apr 11, 2004, in forum: Computer Support
    Replies:
    7
    Views:
    2,724
  3. Ickshka

    Wrap computer components in bubble wrap?

    Ickshka, May 1, 2006, in forum: Computer Support
    Replies:
    7
    Views:
    4,077
    Real Name:
    May 5, 2006
  4. thanatoid

    Re: Word wrap existing PDF?

    thanatoid, Apr 28, 2008, in forum: Computer Support
    Replies:
    1
    Views:
    2,879
    james_paterson
    Dec 27, 2012
  5. Giuen
    Replies:
    0
    Views:
    840
    Giuen
    Sep 12, 2008
Loading...

Share This Page