Expand SharePoint Multi-Line Text Fields in SharePoint On-Premise

by | Microsoft 365, SharePoint, Teams

Powered by LUCK™

Sooner or later like any SharePoint Admin or Power User, you will come across a scenario where the default SharePoint views just won’t do or behave like what you want.  If you’ve been using SharePoint for awhile one thing you sure wish you had was the ability to resize columns in a view.  In Office 365, your wish has been granted.  But in at least SharePoint 2010-2016, it’s not. 

Others have found various ways to fix this, either by using CSS alone or JavaScript to do this.  I prefer the CSS way as I always like to have a no-code solution over JavaScript. 

This recently came up for a client that requested the same, except this was in a multi-line column instead of a single text column.  Others had solved this issue tested for SharePoint 2016 for single-line column in this TechNet forum post but comments noted it didn’t work for multi-line.

What’s The Fix?

Let’s say we have this list here, and we want to expand this Address column:

If we paste in the solution from the post (via Script Editor web part), nothing happens and it doesn’t work.  Why?   Assuming you get the field name right, the problem lies with the CSS class.  The original code applies to this class:

th.ms-vh2

That is the class for single-line text fields, and multi-line text fields use a different class.  If we check it with F12 we can see the class we need:

th.ms-vh2-nofilter

To apply, edit your view page, add a Script Editor web part, open the Snippet Editor, and paste the following:

<style>
th.ms-vh2-nofilter div[DisplayName=’Address’]{
min-width:300px !important;
width:300px !important;
}
</style>

And voila!  Our multi-line text field has been expanded.  Just be sure to change the column name, and choose an appropriate width as desired.

Please contact us if you need any help customizing your lists, libraries or anything else branding related.  We’re here to help!

Search Posts

Categories

Recent Posts

Process: The Science of Selling

Sales representatives possess a unique combination of people skills, product knowledge, and persuasive abilities that allow them to connect with prospects, understand their needs, and close deals. However, while these skills are essential for success in sales, getting...

Resources
Interested in how we can improve your customer and employee engagement?
Contact us for a free assessment ►

Powered by LUCK™