D
dorayme
lrhorer said:When I put an amount of text in a table cell, if the text flows past the
end of the cell, it of course wraps on additional lines. I can cause
the first line of the text to be indented by using the tag <td
style="text-indent: N">, where N is the size of the indent, but this
only causes the first line of the text to be indented. The remaining
lines are left justified right against the left edge of the cell, which
looks cramped. How can I get the remaining lines to be indented?
Actually, what I would like is to have the first line of the cell
indented a small amount and the remaining lines to be indented a bit
more.
As I was reading the above I was sure you were going to say you
wanted the first line of a paragraph indented a reasonable way
and the rest not to look cramped but to be spaced away from the
left edge of the cell wall. That would be the natural thing I
imagined someone might want. And that would be so easy to do.
But no! You want the rest to be indented even more than the first
line. Well, luckily that is easy too. And there are a few ways to
achieve this. This one amuses me suitably and generally looks
like fun:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<title>Index</title>
<style type="text/css" media="screen">
td {border:1px solid; }
p {
padding: 0 0 0 2em;
text-indent: -1em;
}
</style>
</head>
<body>
<table>
<tr>
<td>
<p>When I put an amount of text in a table cell,
if the text flows past the end of the cell, it of course wraps on
additional lines. I can cause the first line of the text to be
indented by using the tag <td style="text-indent: N">,
where N is the size of the indent, but this only causes the first
line of the text to be indented. The remaining lines are left
justified right against the left edge of the cell, which looks
cramped. How can I get the remaining lines to be indented?
Actually, what I would like is to have the first line of the cell
indented a small amount and the remaining lines to be indented a
bit more.</p>
</td>
</tr>
</table>
</body>
</html>