Showing posts with label Surveys. Show all posts
Showing posts with label Surveys. Show all posts

Thursday, September 22, 2016

SharePoint 2013 Survey Word Wrapping with CSS


The other day – I had a user request asking how in a SharePoint 2013 survey – it’s possible to turn word-wrapping on – in regard to the text in questions?

So knowing that the master page being utilized was customized – I cobbled through some search sites and found bits and pieces of what was needed to obtain the text wrapping.

Therefore, to fully implement this – here are the steps to follow:

  1. From the opening page of the survey whose page is overview.aspx click the Respond to this Survey link.
  2. Then from the Gear select Edit page -> click the link Add a Web Part -> Media and Content -> Content Editor -> click Add.
  3. On the right hand side – click the drop down arrow and select Edit Web Part:
  4. Place the cursor into the content section of the web part
     -> in the ribbon select Edit Source.
    5) Copy and paste in the code below into the window and click the OK button
    <style type="text/css">
    .ms-formlabel, ms-vb nobr {white-space: normal; width:660px;} #MSOZoneCell_WebPartWPQ2 .ms-formlabel {word-wrap:break-word;}
    </style>
  5. On the far right hand side under the Content Editor properties expand the Layout then place a checkmark next to Hidden:
  6. Scroll down then select on the right hand side – Apply then OK.
  7. Click in the ribbon the Page tab -> Stop Editing -> Stop Editing. The first page of the survey provided the code was entered correctly should now display the word wrapping.
  8. If the survey has page separators meaning it will have more than one page – then click Next.
  9. Repeat steps 2-7 for each page separation and now word wrapping will be present across the full survey.