/* Setup styles in the other file. */ p:not(:first-child) { margin-top: 10px; background-color: gold; } div:nth-child(2) p:not(:first-child) { white-space: pre; display: inline-block; padding: 5px; margin-top: 10px; width: 100px; text-align: center; }
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="../assets/reset.css" rel="stylesheet"> <link href="setup.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <section> <div> <p>This is some text in the first element.</p> <p>Paragraphs are normally block-level.</p> </div> <div> <p>And some more in the second element.</p> <p> Inline-block </p> <p> will give </p> <p> you more </p> <p> control </p> </div> <div> <p>Then a third one, too.</p> </div> </section> </body> </html>