Nov 11 2019 06:53 AM
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 the size of the column? Thank you!
Nov 13 2019 04:04 PM
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
Nov 15 2019 08:57 AM
@Norman Young Thank you but that does not allow me to move the column slider (Header) to decrease it. That does decrease the acutal column size but the the column visually stays the same. I would like to be able to move the slider (highlighted in picture) so that it decreases the column. Is there a JSON that would accomplish that?
Nov 16 2019 05:58 AM
Hi @Tammy Bruns,
I have not seen any code examples that will do that. It might be possible but I can't say for sure.
I hope this helps.
Norm
Nov 17 2019 02:23 PM
Feb 12 2021 08:22 AM
May 11 2021 07:06 AM
Nov 13 2023 09:18 PM