Peter Tomo
05-17-2003, 03:56 AM
Hello,
my tool generates HTML tables of short one-line cells. Spaces (at least leading spaces) must be preserved and cell-context must not be wrapped.
Options as <TD STYLE="white-space: pre"> or similiar CSS class don't work.
It seems that <TD><PRE> does the task, however it adds additional space between PRE and end of TD cell. All integrated with MS Explorer 5.50....
How do I remove that additional free space, please? Or any other ways to go?
Cheers and thanks for any tips,
Peter Tomo
-------------
<html>
<head>
<STYLE TYPE="text/css"><!--
table pre
{
font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
padding: 0;
spacing: 0;
}
td.like_pre
{
white-space: pre;
padding: 0;
spacing: 0;
}
table
{
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
}
table td
{
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
padding: 0;
spacing: 0;
}
--></STYLE>
</head>
<body>
<table border="1">
<tr>
<td><pre>OK, multiple spaces kept. BUT one additional line added between PRE and end of cell.</pre></td>
</tr>
<tr>
<td class="like_pre">BAD, multiple spaces truncated to one.</td>
</tr>
<tr>
<td style="white-space: pre">BAD, truncates multiple spaces.</td>
</tr>
</table>
<p style="white-space: pre">BAD, truncates multiple spaces (this doesn't matter to me).</p>
</html>
my tool generates HTML tables of short one-line cells. Spaces (at least leading spaces) must be preserved and cell-context must not be wrapped.
Options as <TD STYLE="white-space: pre"> or similiar CSS class don't work.
It seems that <TD><PRE> does the task, however it adds additional space between PRE and end of TD cell. All integrated with MS Explorer 5.50....
How do I remove that additional free space, please? Or any other ways to go?
Cheers and thanks for any tips,
Peter Tomo
-------------
<html>
<head>
<STYLE TYPE="text/css"><!--
table pre
{
font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
padding: 0;
spacing: 0;
}
td.like_pre
{
white-space: pre;
padding: 0;
spacing: 0;
}
table
{
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
}
table td
{
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-weight:normal;
font-style:normal;
font-size:9.0pt;
padding: 0;
spacing: 0;
}
--></STYLE>
</head>
<body>
<table border="1">
<tr>
<td><pre>OK, multiple spaces kept. BUT one additional line added between PRE and end of cell.</pre></td>
</tr>
<tr>
<td class="like_pre">BAD, multiple spaces truncated to one.</td>
</tr>
<tr>
<td style="white-space: pre">BAD, truncates multiple spaces.</td>
</tr>
</table>
<p style="white-space: pre">BAD, truncates multiple spaces (this doesn't matter to me).</p>
</html>