Forum Discussion
Increase Font Size of List Web Part
jcgonzalezmartin yes, SharePoint online. And I believe so, the new List webpart.
- Tyler_TuckerJul 24, 2019Copper Contributor
TheWhiteGoose99 if you're using SharePoint Online, navigate to the list page and then select a column you want to change the font size to Column -> Column Settings -> Format This Column, a window appears on the right, Click Advanced Mode, and a text box appears for you to enter JSON code to manipulate the HTML. Copy and paste the Code snippet below into that JSON text box.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"font-size": "18pt"
}
}You can change the value "18pt" to whatever you want. The formatting settings will carry over to the Web part. Here's a https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting to more JSON formatting if you're interested.
Edit: I realize that you said you were utilizing wiki pages? This method will work with Modern list pages. (Tested)
- GokupeApr 13, 2023Copper Contributoramazing!!!
- mdodge51May 02, 2022Copper Contributor
Tyler_Tucker Very successful with changing Text size!! But was not successful in a "Person" column that is displaying Person bubbles. When I use the Code snippet the bubbles change to [object Object]. Thanks for the support!
- Gerry_Brimacombe1520May 29, 2024Copper ContributorIf you append ".title" the object, that should qualify the object enough to display.
Change:
"txtContent": "@currentField",
to
"txtContent": "@currentField.title",
It should work. Note however that the click/hover capabilities go away (can't click the username to see contact details). I'd love to know if there was a way around this!
- Will2004Mar 22, 2022Copper Contributor3 years later and your code still works like a charm. Thanks!