Julian: Tebellen scrollen

Beitrag lesen

Hallo,

Wenn dir rechts der Abstand zwischen Tabelle und Seitenrand fehlt, der wurde in dem Code-Beispiel des Tutorials unterhalb der Mindestbreite von 60em für table generell entfernt.

in meinem Beispiel kommt aber keine Angabe einer Mindestbreite vor,
siehe:

<style>
table {
	border-collapse: collapse;
	border: thin solid;
	margin: 2em;
}

tr {
	border-top: thin solid;
	border-bottom: thin solid;
}

tr:first-child {
	border-top: 0 none;
}

th, td {
	padding: 1em;
}

thead tr, tr:nth-child(even) {
	background-color: lightgrey;
}

th {
	font-size: 1.2em;
}

tbody th {
	text-align: left;
}

code {
	font-size: 1.2em;
}

td:last-child {
	min-width: 180px;
	text-align: right;
}

img:not(:first-child) {
	margin-left: 5px;
}
</style>

<table>
  <thead>
    <tr>
      <th colspan="4">CSS im Wandel der Zeit</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th><code>font-size</code></th>
      <td><a href="…">wiki.selfhtml.org/wiki/font-size</a></td>
      <td>Die Eigenschaft <code>font-size</code> bestimmt die Darstellungsgröße der Schrift.</td>
      <td>
        <img src="css1.png" alt="Bestandteil von CSS 1">
        <img src="css2.png" alt="Bestandteil von CSS 2">
        <img src="css21.png" alt="Bestandteil von CSS 2.1">
        <img src="css3.png" alt="Bestandteil von CSS 3">
      </td>
    </tr>
    …				
  </tbody>
</table>