Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Word Wrap for site column

  Asked By: Vanessa    Date: Jan 06    Category: Sharepoint    Views: 16474

Does anyone know how I go above with word wrapping with sharepoint site column.
I have a column call "Description" in the document library. When I enter a long
description, in the display page it displayed the long description across the
page. I want to word wrap it so that it does not take up all the space.



9 Answers Found

Answer #1    Answered By: Davin Knapp     Answered On: Jan 06

Can't you just make it a "multiple lines of text" field instead of "single
line of text"?

Answer #2    Answered By: Deidra Best     Answered On: Jan 06

This makes it better, but you still can't control the width of the column.
That seems to be controlled by the list view web part that contains the
actual list. Anyone know how to edit that?

Answer #3    Answered By: Rosalinda Merrill     Answered On: Jan 06

You're probably going to have to open it in SharePoint Designer to change

Answer #4    Answered By: Yogendra Zarapkar     Answered On: Jan 06

I tried that but didn't see a way to edit the layout of the fields in the
web part. I can only set the size of the web part itself, as usual.

Perhaps there is an external file that web parts use to store configuration
or layout information?

Answer #5    Answered By: Jerad Mercado     Answered On: Jan 06

I did used "multiple line of text" when I created the column

Answer #6    Answered By: Riley Scott     Answered On: Jan 06

The more columns you add, the more the text will wrap  as the column  width has
to shrink to adapt. If you only have one column, it will use up all the space
available. I have not been able to find a way to "set" the column size.

Answer #7    Answered By: Adya Khavatekar     Answered On: Jan 06

Just a thought. If you use Multi line text Use the Enhanced text selection,
then create a TABLE inside the space. You can make the table a single cell and
control its width. With one cell made, it's a little touchy getting it to
display its handles with the mouse so you can stretch it to any width and hight
you want. The text flows only in the restricted space.

Answer #8    Answered By: Suzanne Mcdonald     Answered On: Jan 20

You can do it this way for a list view (not in the display form). Replace YOURSCRIPTLOCATION with your location of jquery file and put this javascript in a CEWP (placed BELOW the list):

<script type="text/javascript" src="YOURSCRIPTLOCATION/jquery-1.6.4.min.js"></script>

//find list items (vb2) in list view:
$('.ms-vb2 div').each(function(){
vb2Text = $(this).text();

if (vb2Text.length > 30)
vb2Text = vb2Text.substring(0,30) + " " + vb2Text.substring(30,60) + " " + vb2Text.substring(60,90) + " " + vb2Text.substring(90,120) + " " + vb2Text.substring(120);

//replace vb2 with the modified string:


Answer #9    Answered By: Suzanne Mcdonald     Answered On: Jan 20

(I had this same need this week.) For the display form (BELOW the form):

<script type="text/javascript" src="YOURSCRIPTLOCATION/jquery-1.6.4.min.js"></script>

$('.ms-formbody div').each(function(){
lblText = $(this).text();

if (lblText.length > 30)
lblText = lblText.substring(0,30) + " " + lblText.substring(30,60) + " " + lblText.substring(60,90) + " " + lblText.substring(90,120) + " " + lblText.substring(120);



Didn't find what you were looking for? Find more on Word Wrap for site column Or get search suggestion and latest updates.