Change width of list view column in SharePoint 2013 using SharePoint designer 2013

Change width of list view column in SharePoint 2013 using SharePoint designer 2013

In this post, we will discuss how to change width of list view column in SharePoint 2013 using SharePoint designer 2013. Recently in a business requirement, we got to increase the width of a SharePoint list view column.

Here I have a list which has one column name as “CreatedByFirstName” and the width is a bit bigger and it looks like below:

Change width of list view column in SharePoint 2013 using SharePoint designer 2013
Change width of list view column in SharePoint 2013 using SharePoint designer 2013

Now Open your SharePoint site using the designer. Open the particular list and then in the list settings page, select the particular view, right click and then edit the file in advanced mode.

Once it will open in advanced mode, From the ribbon select the Design tab in the LIST VIEW TOOLS section. And then click on Customize XSLT -> Customize Entire View as shown in the fig below. If you are not able to see LIST VIEW TOOLS tab then, you can follow List View Tools tab missing in SharePoint designer 2013 article.

Change width of list view column in SharePoint 2013 using SharePoint designer 2013
Change width of list view column in SharePoint 2013 using SharePoint designer 2013

Then in the whole file search for below text.

<th nowrap=”nowrap” scope=”col”

Above to the line you will see the below similar kind of line based on your column name.

<xsl:template name=”FieldRef_header.CreatedByEmail” ddwrt:dvt_mode=”header”

Here the column name is “CreatedByEmail”

The we need to put the style attribute in the below <th line like below:

<th nowrap=”nowrap” scope=”col” onmouseover=”OnChildColumn(this)” style=”width:100px;”>

I have set the header to be 100px for this column. Similarly you can define for other columns as well.

Change width of list view column in SharePoint 2013 using SharePoint designer 2013
Change width of list view column in SharePoint 2013 using SharePoint designer 2013

Then save the page and refresh the view, your width should be displayed like below:

Change width of list view column in SharePoint 2013 using SharePoint designer 2013
Change width of list view column in SharePoint 2013 using SharePoint designer 2013

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →