Forum Discussion

specoop1585's avatar
specoop1585
Copper Contributor
Jul 28, 2020

JSON Column width

Hello SharePoint Forum,

Hoping you can help with a question Regarding JSON formatting. I’ve got a list with two columns: a single field and a multi-text line that I’m hoping to better format.

The issue: In my list (and consequently my page), for new users that haven’t visited the site, the column width isn’t automatically moving it over as far as it could (like by a lot…)

I’ve played around with the JSON and have tried width, but it doesn’t seem to actually move the width over. I have to physically drag it over, and then it seems to work – but I don’t want to make each user do that.

Anybody been successful doing getting the width of the column to be larger? I’m not a coder, so less is more for a solution. Thanks,

7 Replies

  • specoop1585 Did you ever find out what happenned with this? I am getting the same problem. However, mine works with Edge and does not do the same on Chrome. 

    • specoop1585's avatar
      specoop1585
      Copper Contributor

      Appreciate the response -- Matti Paukkonen - that works for me on my machine (and in that one broswer), but it's not working in a different browser or for my other users. 

       

      Best,

      Spencer

       

      This also isn't working. 

       

      {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
      "width": "100%",
      "font-size": "1.2em"
      }
      }

      • Matti Paukkonen's avatar
        Matti Paukkonen
        Iron Contributor

        specoop1585 

         

        I got it working with different browsers on my machine (Edge Chromium/Chrome/Firefox). I'll try this one out with my colleague tomorrow.

Resources