JSFiddle - React, Tailwind, and code Playground
by akhurshid
HTML
<div class="d1">Right aligned with "margin-left:auto"</div>
<div class="d2">Left aligned with "margin-right:auto"</div>
<br/ >
<br/ >
<div class="float-left">Left Aligned with "float:left"</div>
<div class="float-right">Left Aligned with "float:right"</div>
CSS
.d1,
.d2,
.float-left,
.float-right { width: 100px; height: 100px;}
.d1 { margin: 0 0 0 auto; background: red; }
.d2 { margin: 0 auto 0 0; background: blue; }
.float-left { float: left; background: red; }
.float-right { float: right; background: blue; }