<?xml version="1.0" encoding="iso-8859-1" ?>
<!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" lang="de" xml:lang="de">
<head>
 <title>Problemf&auml;lle XHTML und CSS: Absatzr&auml;nder in Tabellenzellen</title>

 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <meta http-equiv="Content-Language" content="DE" />
 <meta http-equiv="Content-Style" content="text/css" />

 <meta name="description" content="Problemf&auml;lle XHTML und CSS: Absatzr&auml;nder in Tabellenzellen." />
 <meta name="keywords" content="HTML, Tabellen, CSS, XHTML" />
 <meta name="author" content="Roland Unger" />

 <style type="text/css">

  body > *:first-child, td > *:first-child { margin-top: 0px; }
  body > *:last-child,  td > *:last-child  { margin-bottom: 0px; }

 </style>
</head>

<body>

<h1>Problemf&auml;lle XHTML und CSS</h1>

<h2>Absatzr&auml;nder in Tabellenzellen</h2>

<p>XHMTL-Dokumente stellen R&auml;nder von Abs&auml;tzen und &Uuml;berschriften
grunds&auml;tzlich dar. St&ouml;rend ist h&auml;ufig, insbesondere in Tabellen, dass der
obere Rand des ersten bzw. der untere Rand des letzten Absatzes ebenfalls dargestellt
werden. Dieses Problem l&auml;sst sich mit den Pseudoformaten first-child und
last-child l&ouml;sen.</p>

<h2>Beispiel</h2>

<table summary="Beispiel f&uuml;r Horizontallinie" cellspacing="0" cellpadding="0" border="1">
<tr>
 <td><h3>&Uuml;berschrift</h3>
 <p>Dies ist ein Absatz</p></td>
</tr>
</table>

</body>
</html>