• poppy

    (@poppy)


    I’m a newbie so still finding my way around the wp-stuff.
    The textarea in the comments form starts off a good size, but as soon as I type a character in it it widens so it is off the screen on the right. Typing in it I get no wordwrap – just goes on forever.
    Also when I hit the submit button I just get the same form re-written with the text area back to its original shape and empty – and no comment gets stored.

Viewing 8 replies - 1 through 8 (of 8 total)
  • dissurion

    (@dissurion)

    This doesn’t happen in firefox, but in IE. One possibility is that it is cuased because of the setting width=100% for the textarea.

    #commentform textarea {
    width: 100%;
    }

    In your index file it reads:

    <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4">

    so it probably starts of with values, and as soon as you type in it IE gives it a 100% screen width. And since you don’t start at the left edge, 100% goes further than the right edge.

    You could try to just leave to width=100% out of your stylesheet and see if that fits your needs.

    Thread Starter poppy

    (@poppy)

    Yes – I saw that and tried taking it out, but it didn’t work. Thanks for your help though – the fact that it’s an IE thing is a good starting point. I just checked Opera and that’s okay too – though it does have other problems!

    dissurion

    (@dissurion)

    Ok, here goes another suggestion. I checked textarea width with 70 cols, and that is exactly the width it gets in IE after it widens. So now I think that what’s going on is the opposite of what I thougth above: IE first puts it at 100% (relative to the width of the parent) and widens to 10 cols after you use it. You can check this by changing the

    <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4">

    Change the cols=”70″ to something very low so you see the result. If it then changes accordingly you know what the problem is. Then I’d still recommend leaving the 100% out and just search a cols=”x” that’s ok.

    Thread Starter poppy

    (@poppy)

    Thanks dissurion – that does the trick!

    ejm

    (@llizard)

    Or you could add a special style that only IE will read:

    In your stylesheet, look for:
    #commentform textarea {
    width: 100%;
    }

    And below it, add

    *html #commentform textarea {
    width: 600px;
    }

    Or whatever pixel width works for you on IE – I just chose an arbitrary number. This style spec will only be read by IE (at least I believe this is true)

    rohitkumar

    (@rohitkumar)

    that works @llizard

    Does anyone know why IE behaves this way when these textareas are given a width in percentages but not when given a width in pixels?

    I found this post because I was having this problem in the plugin editor and theme editor textareas. I would like to be able to set the width as a percentage so that it doesn’t mess up if I resize my window. I’m just wondering if some other part of the CSS is causing this to happen to the textareas.

    I’ve pretty much given up trying to guess how or why IE behaves (or should I say, ‘misbehaves’?), melbell.

    As is written in “The Browser Wars”:

    Internet Explorer has become the bane of any forward-thinking web designera€?s existance. With the onset of advanced CSS layout techniques, IE6a€?s rendering engine has been exposed as buggy and unreliable.

    whole article here:
    https://www.yourhtmlsource.com/starthere/browserreview.html

    I realize that I’m replying rather late to this thread, but these sites may offer better answers:

    https://www.positioniseverything.net/ie-primer.html
    https://www.jakpsatweb.cz/css/css-vertical-center-solution.html

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘comments textarea goes wide’ is closed to new replies.