• Resolved Vincent

    (@vincentludenhoffgmailcom)


    Hi,

    I want to resize the comment box – using CSS – to make it smaller and less prominent.
    I have a TwentyEleven child theme, Running WP 3.3.
    I managed to resize the width of the box with this rule:

    #comments {
    width:70%;
    }

    But I can’t seem to adjust the height of the commentbox. Most importantly the height of the textarea. I’ve tried stuff like:

    #respond textarea #comment {
    height:200px;
    }

    And quite some variations.
    I’m using chrome & firefox with Firebug to debug.

    But the height of the comment box seems calculated. And not defined with a CSS rule I can adjust. Adding a new rule doesn’t do the trick, since it seems the rule is being overruled by the calculations. I can’t figure out where or when this calculation takes place.

    Any ideas on resizing the commentbox height?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You almost had it above, just a slight change to your css

    #respond textarea#comment {
        height:300px;
    }

    Notice the lack of space between textarea & #comment. With a space between them, the css tries to find something with the id of comment inside of the textbox, which doesn’t exist. Having no space tells it to find a textbox with the id of comment.

    Thread Starter Vincent

    (@vincentludenhoffgmailcom)

    Ghee, that simple. :~|
    Time to refresh my CSS skills!

    It does work! Thanks a lot.

    In the meantime I found a workaround btw. It’s very dirty, and NOT the right solution! But in wp-includes/comment-template.php is the following function:

    function comment_form( $args = array(), $post_id = null ) {
    ....

    It outputs the following line of HTML:

    'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',

    I’ve managed to adjust the height of the textarea by adjusting rows=”8″ to rows=”4″.

    Repeat: this is NOT the way to go! I just mentioned this for the completeness of this topic.

    But if you’re wandering where the HTML is, that builds the commentbox (like I was), this is where it’s at. ../wp-includes/comment-template.php

    @cmmarslender Thanx again. I wasted a lot of time and energy on a nobreakspace? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Twenty Eleven] Adjust comment box size / Height textarea’ is closed to new replies.