I recently had a request on one of my sites to increase the size of the Description column in the SharePoint views. Out of the box, there’s no easy way to do that. But, with a little snippet of jQuery placed in a Content Editor Web Part on the page with the view, you can easily change any of the column widths…
Here’s the code I used:
<!--ADJUST TABLE COLUMN WIDTH--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"> </script> <script type="text/javascript"> $(function(){ $("div.ms-vh-div:contains('Description')").css("width", "350px");});</script>
If you have multiple columns to modify, just repeat the line with the “div.” string. This is so simple, my customer went in and made her own changes to the code.
Many thanks to Mark Miller, who provided the solution in the post SharePoint jQuery: Setting View Column Width.
Thank you! Thank you! Thank you!
Works!
Thank you 🙂
Hi, I tried applying this but it doesn’t seem to be working in edit mode or datasheet view mode? Has someone encountered the same problem?
Yes.. It is not working in quick edit mode
how can make this script available across all the Views
In order to get this to work, you have to add a script editor web part to your page and embed the script snippet.