JSFiddle - React, Tailwind, and code Playground

HTML

<body style="text-align:center">

<h1>padding test</h1>

<div style="padding:1em;float:left;width:50%;background-color:#faa">This div has 50% width, 1em 

padding, float left</div>

<div style="background-color:#0f0;padding:1em">This is a div with 1em padding</div>

<hr>

<div style="float:left;width:50%;background-color:#faa">This div has 50% width and float 

left</div>

<div style="background-color:#0f0">This is a normal div</div>