WordPress.org

Ready to get started?Download WordPress

Forums

Theme Comments textarea too big (8 posts)

  1. animalien
    Member
    Posted 6 years ago #

    OK - going crazy here. I created a page I want to have people comment on. THe problem is the comment box is way too wide. I changed the textarea to:

    <textarea name="comment" id="comment" style="width: 400!important; height:164;" rows="10" tabindex="4" cols="45"></textarea>

    However, when I refresh and look at the page source, it says:

    <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>

    I searched the archives and found a post where they mention to change the default themes' comments.php. I did that, and it did not fix my issue. I got rid of both the default and classic profiles, so my profile is the only one left. The box still is at 100%.

    Any thoughts? I am going out of my mind on this one.

    Thanks.

  2. FiberBoy
    Member
    Posted 6 years ago #

    Hi, I'm having the same exact problem on my site (http://www.joyfuldigesting.com/ if you want to take a look). Did you ever find a solution to this? If so, please share!! Thanks very much.

  3. moshu
    Member
    Posted 6 years ago #

    Did you try editing the file on your computer in a plain text editor and uploading it again?
    What did you try to fix it?

  4. Jeremy Clark
    Moderator
    Posted 6 years ago #

    If you look in your stylesheet you see a section like this

    /* CSS for forms -------------------------------------- */

    In that section will be this code

    .comment-textarea{width: 96%; padding: 0; margin: 0; }

    Change it to this

    textarea#comment{width: 96%; padding: 0; margin: 0; }

  5. Joni
    Member
    Posted 6 years ago #

    style="width: 400!important; won't work because you didn't specify px, em, pt, etc. But the better solution is a percentage width, which jeremy pointed out. I like to use 90% or 95%.

    HTH

  6. FiberBoy
    Member
    Posted 6 years ago #

    Jeremyclark - you hit the nail right on the head! Thank you SO much! That was a relatively painless fix. I'll suggest this thread to the template creator also, he may be able to incorporate it in future versions.

    Thanks to all who replied, as well!

  7. bobbykjack
    Member
    Posted 5 years ago #

    The value of 100% for the cols attribute is invalid HTML - it needs to be replaced with an absolute number, or the same effect can be achieved via CSS.

  8. bobbykjack
    Member
    Posted 5 years ago #

    P.S. Firefox interprets that as "100", hence the massively wide textarea.

Topic Closed

This topic has been closed to new replies.

About this Topic