• djhomeless

    (@djhomeless)


    Hi Everyone,
    Dealing with what should be a very easy problem; for whatever reason, I’m struggling with it…

    I personally find the content textarea too narrow for my liking. In the admin panel, it seems fairly easy to add more rows, but there doesn’t seem to be a simple way to add colums. In fact, this seems to be ignored because the textarea is defined by a style, like so:

    <textarea rows="<?php echo $rows; ?>" cols="10" name="content" tabindex="5" id="content">

    In the stylesheet for my theme, the content class is defined to be just 510px wide. The content class is also used to style the content layout on the page view as well.

    Here’s where it gets a bit tricky. If I create a new class, say content1, and give it the exact same elements that are in the content class, then it works (which means I can increase the size to whatever I want). However, for whatever reason, the quicktags fail to work using this new style!

    My only option is to increase the width defined in the content class, but that will impact how the content is styled on the front end. Considering WordPress wraps each paragraph element inside brackets, it shouldnt really matter for the input and display elements to be the same width correct?

    Or am I missing something here?

    Thanks for your help.

    Geoffrey

Viewing 6 replies - 16 through 21 (of 21 total)
  • Beel

    (@beel)

    Well then you will have to get specific, instead of something like:

    .whateverclass { whatever }

    you will have to use:

    textarea.whateverclass { whatever }

    Ahh, I think I get it now. I bet your front page has a div with an ID of “content” and the textarea is also given an ID of “content.” This ordinarily would not be a problem but since your theme dinks with the admin display, to change just the textarea in admin you will probably need to use “textarea#content { }” as “#content {}” will affect both the content div on the front page and the textarea in the admin write page.

    Thread Starter djhomeless

    (@djhomeless)

    Sadly I tried that.

    Whenever I created a new class for the textarea, the form would indeed change. However, for whatever reason the quicktags stopped working!

    Does anyone know why that would happen?

    Thread Starter djhomeless

    (@djhomeless)

    *sigh*
    This thread is not going anywhere. I will make one last valiant attempt to get my point across. ??

    Whenever a textarea is used in the admin pages to input/edit content, the code is this:

    <div><textarea rows="<?php echo $rows; ?>" cols="10" name="content" tabindex="5" id="content"><?php echo $content ?></textarea></div>

    Note the class id of “content”.

    In wp-admin.css, there is just the following simple CSS entro for content:

    #content, #excerpt {
    margin-left: 1%;
    width: 130%;
    }

    Changing this CSS entry to increase the text size has no affect.

    My theme’s CSS, which is called site-wide from the header, ALSO has an entry called “content”. It is as follows:


    #content {
    width:510px;
    float:left;
    padding:5px;
    margin:0;
    overflow:hidden;
    display:inline;
    }

    If I change this entry, it WILL increase the textarea in the admin pages. However, it ALSO changes how the content is styled on the site, despite the fact that the content is styled inside a differently named class!

    Also, if I create a new class to use on the textarea in the admin pages, it WILL work (ie it increases the textbox size). HOWEVER, the quicktags fail to function using this new class.

    Sorry for being so literal, and taking so much space. I’m really struggling on how to solve what should be a fairly straightforward change.

    thanks

    This, when placed at the bottom of wp-admin.css, makes the textarea a bit larger:

    #postdiv {
    width:1000px;
    }

    That also break the overall width of the containers, and wanders behind the categories (at least on my page is does).

    Is that what you mean ?

    Thread Starter djhomeless

    (@djhomeless)

    That increases the size of the div container around the quicktags and the textarea. It doesn’t increase the size of the textarea.

    It would be nice to know why the quicktags seem to have some dependency on the textarea using a specific class….?

    My textarea took off east at that size.

    Could you mockup a screenshot of what you want ?

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘How can I make the textarea for content and pages wider?’ is closed to new replies.