Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to make the width of all the textarea in a page wider?

<textarea dir="none" class="ms-long" title="What?" id="WebPartManager_g_409d0371_09d6_4e84_99d3_02e694bd1a6d_ff10_new_ctl00_ctl00_TextField" cols="20" rows="10" name="WebPartManager$g_409d0371_09d6_4e84_99d3_02e694bd1a6d$ff10_new$ctl00$ctl00$TextField" style="border: 13px solid red;"></textarea>

Thanks in Advance

share|improve this question
add comment

2 Answers 2

the easiest way to make this text field wider is to redefine the the style sheet class for .ms-long. The actual wide of ms-log as far as i remember is set to 250px.

.ms-long{
    width: 450px;
}

This can be done by SharePoint Designer.

If you just want textarea tag to be wider you need to use

textarea.ms-long{
    width: 450px;
}

For IE if it doesn't work you can try to use: textarea.ms-long{ width: 450px !important; } The !important in the style definition tells the browser that no other css rule is allowed to overwrite you specification. If checked the with on lists now an they have on my server a value of 356px width.

share|improve this answer
    
Thanks Stefan but i need it for only textarea element.The input element also have .ms-long class.Cheers –  naijacoder Oct 24 '11 at 7:17
    
Stefan i tried that and one of the textarea got wider in firefox but it doesn't work in IE at all. Any ideas? –  naijacoder Oct 26 '11 at 3:42
    
Stefan !important didn't work either. Anyone cn help there must be a way to increase the width of the textarea boxes. Thanks in Advance –  naijacoder Nov 3 '11 at 0:33
add comment

Here is the solution. If I understand it correctly, rich text editor is no longer rendered as an IFrame. Width is controlled by CSS style (thanks Microsoft! this is a big improvement from SP2007)

All I had to do was override the following style:

.ms-formbody .ms-rtefield { width: 500px; }

One thing to keep in mind is that MSFT has defined a min-width for RTE which is 384px in forms.css. If you want to go narrower than 384 px, you can add that property in the above class.

http://social.technet.microsoft.com/Forums/en-US/efcbc1e7-2588-465b-ba7e-d9f6098ae02e/resizing-the-width-of-rich-text-editor-in-a-blog?forum=sharepointdevelopmentprevious

Credit to Difident http://social.msdn.microsoft.com/profile/diffident/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/office/en-US/efcbc1e7-2588-465b-ba7e-d9f6098ae02e/resizing-the-width-of-rich-text-editor-in-a-blog?forum=sharepointdevelopmentprevious

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.