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:
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.
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.
Then save the page and refresh the view, your width should be displayed like below:
Hope this will be helpful.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.
You May Also like the Following SharePoint Online Tutorials: