<!doctype html>
<html>
	<head>
		<title>Display inline-block</title>
		<link href="/assets/reset.css" rel="stylesheet">
		<link href="setup.css" rel="stylesheet">
		<link href="style.css" rel="stylesheet">
	</head>
	<body>
		<section>
			<p>This is some text in the first element.</p>
			<p>Paragraphs are normally block-level.</p>
		</section>
		<section>
			<p>And some more in the second element.</p>
			<p> Inline-block </p>
			<p> will give </p>
			<p> you more </p>
			<p> control </p>
		</section>
		<section>
			<p>Then a third one, too.</p>
		</section>
	</body>
</html>

		
index.html
			/* Same as before. */
body {
	font-family: sans-serif;
	padding: 1rem;
}

section {
	background-color: deepskyblue;
	border-block-start: solid black 0.2rem;
	padding: 1rem;
}

section:not(:first-child) { margin-block-start: 1rem; }

		
setup.css
			p:not(:first-child) {
	background-color: gold;
	margin-block-start: 1rem;
}

section:nth-child(2) p:not(:first-child) {
	display: inline-block;
	inline-size: 12rem;
	margin-block-start: 1rem;
	padding: 0.5rem;
	text-align: center;
	white-space: pre;
}

		
style.css