newbie -needs help displaying into textarea from a db

Discussion in 'HTML' started by Joe Todd, Nov 12, 2008.

  1. Joe Todd

    Joe Todd Guest

    I apologize in advance because I think this problem has been posted before,
    but I haven't seen any answers.

    I have some data in a MySQL db that I'm trying to put into a page for
    editing.
    All is OK except for a couple of potentially large chunks of text that I
    have set up to go into a textarea.
    What I'm getting is the first line of text apparently centered with some
    gratuitious tabs and spaces in the front.
    Subsequent lines seem to be OK. I have tried several unsuccessful means of
    left-alligning all the text. It's not too bad with a truly large amount of
    text, but it looks horrible when there's just a few words.

    What do I need to do to display the text correctly? I would prefer a
    stylesheet solution if possible, but a pure html solution that works is OK
    with me too!

    Thanks,

    Joe Todd
     
    Joe Todd, Nov 12, 2008
    #1
    1. Advertising

  2. Joe Todd

    dorayme Guest

    In article <491b2e81$0$33226$>,
    "Joe Todd" <> wrote:

    > I apologize in advance because I think this problem has been posted before,
    > but I haven't seen any answers.
    >
    > I have some data in a MySQL db that I'm trying to put into a page for
    > editing.
    > All is OK except for a couple of potentially large chunks of text that I
    > have set up to go into a textarea.
    > What I'm getting is the first line of text apparently centered with some
    > gratuitious tabs and spaces in the front.
    > Subsequent lines seem to be OK. I have tried several unsuccessful means of
    > left-alligning all the text. It's not too bad with a truly large amount of
    > text, but it looks horrible when there's just a few words.
    >
    > What do I need to do to display the text correctly? I would prefer a
    > stylesheet solution if possible, but a pure html solution that works is OK
    > with me too!


    Would it be possible, now I don't mean to seem pushy, and please
    understand that I have every respect for your private use of HTML/CSS,
    for you at least to give some hints as to what HTML and/or CSS you might
    have tried. I repeat, I am not probing for any URL or any snippet of
    what you have actually tried. No, just a wee hint more, if that would be
    ok with you, if you can be bothered? When you have plenty of time.

    --
    dorayme
     
    dorayme, Nov 12, 2008
    #2
    1. Advertising

  3. Joe Todd

    Joe Todd Guest

    RIGHT! It's working as expected now.

    Thanks for your quick reply,

    Joe


    "Ben C" <> wrote in message
    news:...
    > On 2008-11-12, Joe Todd <> wrote:
    >> I apologize in advance because I think this problem has been posted
    >> before,
    >> but I haven't seen any answers.
    >>
    >> I have some data in a MySQL db that I'm trying to put into a page for
    >> editing.
    >> All is OK except for a couple of potentially large chunks of text that I
    >> have set up to go into a textarea.
    >> What I'm getting is the first line of text apparently centered with some
    >> gratuitious tabs and spaces in the front.
    >> Subsequent lines seem to be OK. I have tried several unsuccessful means
    >> of
    >> left-alligning all the text. It's not too bad with a truly large amount
    >> of
    >> text, but it looks horrible when there's just a few words.
    >>
    >> What do I need to do to display the text correctly? I would prefer a
    >> stylesheet solution if possible, but a pure html solution that works is
    >> OK
    >> with me too!

    >
    > What you've probably got in your markup is something like this:
    >
    > 1: <textarea rows=4 cols=72>
    > 2: blah blah blah
    > 3:blah blah blah blah blah
    > 3: </textarea>
    >
    > The tabs and spaces on line 2 before the first "blah" go into the
    > textarea.
    >
    > You need to make sure it comes out like this:
    >
    > 1: <textarea rows=4 cols=72>
    > 2:blah blah blah blah blah blah blah blah
    > 3: </textarea>
    >
    > Don't put any newlines or whitespace in the textarea contents unless you
    > want them to appear on the page.
    >
    > You can't do anything with CSS because a textarea is a replaced element.
    > Some CSS (colours and things) may work but you should treat any support
    > you get in browsers as "experimental".
     
    Joe Todd, Nov 12, 2008
    #3
    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. rob
    Replies:
    7
    Views:
    377
    osmium
    Oct 20, 2007
  2. Augustus
    Replies:
    1
    Views:
    402
    Ken Schaefer
    Sep 10, 2003
  3. Textarea Inside of a textarea

    , Feb 4, 2006, in forum: ASP General
    Replies:
    6
    Views:
    364
    Anthony Jones
    Feb 5, 2006
  4. lawrence
    Replies:
    3
    Views:
    100
    kaeli
    Jun 3, 2004
  5. Replies:
    1
    Views:
    359
    Bart Van der Donck
    Jul 4, 2007
Loading...

Share This Page