开发者

How to force text in an HTML table cell to wrap?

Below is sample html from a printable details page. Unfortunately, some of the data is being cut off.

Why does the text in the 'data' cells not wrap? Specifically, the row labelled 'Details'.... How can I get that row to wrap so that it will be visible when printed?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <title>Survey Request Details for Form No: 3016</title>
  <style>

    td{
      font-size:20px;
    }
    td.data{
      font-family:monospace;
    }

  </style>
  <script language="javascript" type="text/javascript" >
    window.print();
  </script>
</head>
<body>
  <table width="900">
    <tr><td class="label">....................................................</td><td class="data"></td></tr>

    <tr><td class="label">Form No.</td><td class="data">3016</td></tr>
    <tr><td  class="label">Status </td><td  class="data">Open</td></tr>
    <tr><td  class="label">Survey Reason</td><td class="data">New Business</td></tr>
    <tr><td  class="label">Policy Number:</td><td class="data">TT FCP 855445</td></tr>
    <tr><td  class="label">Broker/Agent Name:</td><td class="data">Agostini Insurance Brokers </td></tr>

    <tr><td  class="label">Broker/Agent Contact.</td><td  class="data">Russell Heera </td></tr>
    <tr><td  class="label">Broker/Agent Contact No:</td><td class="data">1-868-991-8921</td></tr>
    <tr><td  class="label">Requested By:</td><td class="data">First Name</td></tr>
    <tr><td  class="label">Requested On:</td><td class="data"> 9/28/2010</td></tr>

    <tr><td  class="label">Due on:</td><td class="data">9/30/2010</td></tr>
    <tr><td  class="label">Surveyor:</td><td class="data">Kion Stephen</td></tr>
    <tr><td  class="label">Assigned On:</td><td class="data">9/28/2010</td></tr>
    <tr><td  class="label">Survey Completed On:</td><td class="data"></td></tr>
    <tr><td  class="label">Report Completed On:</td><td class="data"></td></tr>

    <tr><td  class="label">Report File:</td><td class="data"></td></tr>
    <tr><td  class="label">Insured Name:</td><td class="data">Stephen B开发者_如何学Goail</td></tr>
    <tr><td  class="label">Insured Contact:</td><td class="data">Stephen Bail</td></tr>
    <tr><td  class="label">Address:</td><td class="data">Plaisance&nbsp;Pk</td></tr>
    <tr><td  class="label">Location Code:</td><td class="data">PLAISANCE PARK,POINTE-A-PIERRE</td></tr>

    <tr><td  class="label">Contact No:</td><td class="data">1-868-555-5555</td></tr>
    <tr><td  class="label">Zone:</td><td class="data">South Trinidad</td></tr>
    <tr><td  class="label">Business Type:</td><td class="data">hotel</td></tr>
    <tr><td  class="label">Subject Matter Detail:</td><td class="data">Blg&nbsp;$5M</td></tr>

    <tr><td  class="label">Loss Detail:</td><td class="data">Not&nbsp;applicable</td></tr>
    <tr><td  class="label">Loss Amount:</td><td class="data">0</td></tr>
    <tr><td  class="label">Loss Type:</td><td class="data"></td></tr>
    <tr><td  class="label">Loss Cause:</td><td class="data"></td></tr>
    <tr><td  class="label">Date of Loss:</td><td class="data">          </td></tr>

    <tr><td  class="label">Details:</td><td class="data">Kindly&nbsp;survey&nbsp;this&nbsp;risk&nbsp;as&nbsp;the&nbsp;Insured&nbsp;wishes&nbsp;to&nbsp;acquire&nbsp;insurance&nbsp;with&nbsp;Guardian&nbsp;General&nbsp;Insurance&nbsp;Limited</td></tr>

    <tr><td  class="label">Building Occupancy:</td><td class="data">Hotel</td></tr>
    <tr><td  class="label">Rate:</td><td class="data">2.225</td></tr>
    <tr><td  class="label">Premium:</td><td class="data">15,000.00</td></tr>
    <tr><td  class="label">Notes:</td><td class="data"></td></tr>
    <tr><td  class="label">Last Editing User:</td><td class="data">John Doe</td></tr>

    <tr><td  class="label">User to Notify:</td><td class="data">John Doe</td></tr>
 </table>
</body>
</html>


Because it's filled with non-breaking spaces. Replace them with normal ASCII spaces.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜