JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outer">
<div class="inner">
<h3>Watch the parent element's padding change when you narrow the viewport.</h3>
</div>
</div>
CSS
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.outer {
max-width: 600px;
border: 1px solid #0f0;
padding: 40px 10%; }
.inner {
border: 1px solid #f00; }