How to Adjust Column Width in SharePoint List View?

Requirement: Adjust SharePoint column width in list view.

To change column width in SharePoint, There are two options:

  1. Set column width using SharePoint Designer
  2. Change SharePoint column width using jQuery, as below:
sharepoint change column width jquery

To set width of column in SharePoint 2007, place the below code in CEWP, place it below list view web part and hide it!

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
   $("TH.ms-vh2-nograd:contains('Reason')").css("width", "150px");
});
</script>

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *