I am trying to increase the width of a column in a SharePoint Online List Web Part. Unfortunately, none of the suggestions offered in StackExchange work for me. I have been adding JavaScript in a Modern Script Editor Web part as shown below but it is not increasing the width of the column.

<style type="text/css">
      width: 310px; 

enter image description here

  • modern or classic? Some stuff simply cannot be changed with script hacks.
    – teylyn
    Sep 15, 2020 at 1:36

1 Answer 1


It's not recommend to create or add ungoverned code on modern SharePoint pages, you need to get started with SPFx:


You could consider using json formatting as shown below to increase the width of list column:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "color": "green",
    "width": "300px"


enter image description here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.