sdyates has asked for the wisdom of the Perl Monks concerning the following question:

When I send a string to IE5.0, it automatically wraps the contents. However, I want to prevent this from happening. I do not want word wrapping. When I return error messages from the DBI, they do not word wrap. I am yet to figure why one wraps and the other does not. Any ideas on how I can prevent wrapping? Do you need to see any code? Please advise, simon

Replies are listed 'Best First'.
Re: Preventing word wrapping in html/cgi
by suaveant (Parson) on Aug 28, 2001 at 18:25 UTC
    The <NOBR>..</NOBR> tag may also help... prevents wrapping but doesn't change font, if you care... and allows other html markup

                    - Ant
                    - Some of my best work - Fish Dinner

Re: Preventing word wrapping in html/cgi
by Masem (Monsignor) on Aug 28, 2001 at 18:33 UTC
    You cannot prevent word wrapper in normal (non-PRE) text; this is a feature of HTML as it adapts the text to fit into the space provided.

    You can use PRE tags which will display the text without introducing new new-lines, but this will also display it as a fixed-font size, which might defeat your purpose.

    The only way around wrapping problems is to use either HTML or CSS elements to specify the width of the region that you are trying to print into. (A common use, for example, is to use a TABLE with a single TR, TD set, with a width set to an explicit number like 500 pixels).

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    It's not what you know, but knowing how to find it if you don't know that's important

      I must admit I am a little weak in HTML as I only use it when needed. Sorry for the miss post... I thought it was more of a formating issue of the output string...
Re: Preventing word wrapping in html/cgi
by dragonchild (Archbishop) on Aug 28, 2001 at 18:18 UTC
    (This sounds like more of an HTML question vs. a Perl question.)

    I'm guessing that there is a <pre> tag involved somewhere with the DBI messages. Have you viewed the source (through your browser) of the page generated when you have a DBI error?

    ------
    /me wants to be the brightest bulb in the chandelier!

    Vote paco for President!

Re: Preventing word wrapping in html/cgi
by Hofmator (Curate) on Aug 28, 2001 at 18:24 UTC

    Well, not exactly a perl question ;-))
    It seems like you could do with a good HTML tutorial, e.g. at w3schools. The <pre> tags might be what you are looking for...

    -- Hofmator

Re: Preventing word wrapping in html/cgi
by tune (Curate) on Aug 28, 2001 at 18:24 UTC
    Yes it's absolutely not a Perl question. However use the <pre></pre> tag, or &nbsp; instead of simple spaces.

    --
    tune