Beispiel:CSS2 padding.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />
		<title>padding</title>
		<style>
			p { display: table; }
			.typA { padding: 1em;             border: 1px solid red }
			.typB { padding: 1em 2em;         background-color: #dddddd }
			.typC { padding: 1em 2em 3em;     border: 1px solid red }
			.typD { padding: 1em 2em 3em 4em; background-color: #dddddd }
		</style>
	</head>
	<body>
		<h1>Verwendung von <code>padding</code></h1>
		<main>
			<p class="typA">typA mit <code>padding: 1em</code></p>
			<p class="typB">typB mit <code>padding: 1em 2em</code></p>
			<p class="typC">typC mit <code>padding: 1em 2em 3em</code></p>
			<p class="typD">typD mit <code>padding: 1em 2em 3em 4em</code></p>
		</main>
	</body>
</html>