I want to change the column width of a List in SharePoint Online. I have tried to do it with a script but it doesn’t work. Any ideas?
I haven’t tried it but it seems you can use ‘column-width’ JSON to change the width.
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
i tried below code and it work for me 🙂
{
“$schema”: “https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json”,
“elmType”: “div”,
“txtContent”: “@currentField”,
“style”: {
“width”: “100%”,
“white-space”: “nowrap”
}
}
Why do you need to this? Only asking as there maybe another solution such as amending to the List’s View.