title: Sharepoint online list specify column width and row height with json
body: <p>I am trying to format a SharePoint Online modern list using json and I couldn't find a way to specify a custom column width and row height. 
  So far it looks like this
  and users have to manually adjust column width.</p>
  
  <p><img src="https://i.stack.imgur.com/ZElzN.png" alt="enter image description here"></p>
  
  <p>My json code is this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "@currentField",
    "style": {
      "width": "200px",
      "white-space": "nowrap",
      "padding-left": "=if(indexOf(@currentField, ' ') == 1, '', if(indexOf(@currentField, ' ') == 3, '20px', '40px'))"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Also, I couldn't find a way to make the list more compact. The default row height is too high.</p>
  
  <p>How can I specify column width and row height?</p>
  
  <p>I am new to SharePoint so any help will be appreciated. Thank you!</p>