Forum Discussion
주현 김
Aug 19, 2016Iron Contributor
Column width resize in modern list
I am using modern list, and it is truly great, very well designed. Anyway, I am using 6~7 columns, and "title" column's width is unnecessarily long, thus i have to scroll right to see entire colu...
Jenny Bruce
Apr 13, 2021Iron Contributor
Have you tried formatting the column with custom JSON? The Microsoft 365 PnP Blog a nice introduction article about Modern SharePoint List Formatting
This doesn't specifically talk about setting column widths, but setting column widths using css in your JSON is among the many styling things you can do.
- rmc2123May 19, 2021Copper Contributor
My experience with the changing column widths using the JSON column formatter is that it changes the width of the text within the column, but not the width of the column itself. So if I set a column width for a description field to 500px, the default for other users would be a small column where the text was horizontally cut off until you dragged the column itself wider. Example of what I've tried that is still unsatisfactory below.
{"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json","elmType": "div","txtContent": "@currentField","style": {"width": "500px"}}Still doesn't seem like there's a way for list/library web parts to have a persistent column width across users, which makes longer text fields look pretty terrible for users that haven't manually resized, no matter how you format the json (unless I'm missing another way of changing the actual column width in the json formatter).