SharePoint list column header to wordwrap

Kena Mistry 0 Reputation points
2024-12-12T21:33:19.1233333+00:00

Hi,

I have couple of columns name in Sharepoint list are very long and the column title is cut off as the content is very short under each column.

I tried some of the options as listed below but none of them work. For your reference I am using modern Sharepoint Online version.

  1. adding following <style> to Sharepoint Designer -> allItems.aspx file in the ContentPlaceHolder . this style format the entire view of the my SP list view and it not wordwrapping the title.

User's image

1.

Also tried with JSON code as well as shown below. This code I entered in individual column setting

{

 "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",

 "elmType": "headertext_*",

 "style":{

       "white-space":"normal"

 },

 "txtContent": "[$Title]"

}

Please suggest me If I make any mistake on these option and is there any other way I can wordwrap all my columns header that has many characters.

Thank you so much for your reply in advance!

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-12-13T02:08:12.31+00:00

    Hi @Kena Mistry,The <style> you added in SPD doesn't work on SharePoint modern page, It will only work on classic page. As per my understanding, currently you cannot format SharePoint default Title column. You could only use the following customRowAction available & supported in JSON formatting.

    Documentation: SharePoint JSON Formatting - customRowAction

    As a workaround, you could manually increase the width of column header by dragging it to the right & save the library view.

    User's image

    User's image

    Since it turns out to be a by-design one. And I noticed that some end users have also proposed the same request. It is highly recommended that you could raise a ticket on feedback. And I will vote up the ticket for you. Many features of our current products are designed and upgraded based on customers’ feedback. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.