Forum Discussion
Tammy Bruns
Nov 11, 2019Copper Contributor
Column Width in Sharepoint List
I have a modern site that has a column for state which is abbreviated i.e. IL, MT, FL but I cannot get the column width to decrease. I am using Sharepoint Online. Can anyone help me with decreasing t...
Norman Young
Nov 14, 2019MVP
Hi Tammy Bruns,
You can use JSON column formatting. You may want to decrease (rename) the column name width as well (manually). Example below:
Sample JSON code:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"width": "50px"
}
}
I hope this helps.
Norm
VincentElements
Feb 12, 2021Copper Contributor
Hi Norm. I tried using your code on a SharePoint classic column, but it did not increase the width if I chose e.g. 200px
Please note my column is a rich text field:
Column name:
The type of information in this column is:
Multiple lines of text
Please note my column is a rich text field:
Column name:
The type of information in this column is:
Multiple lines of text