JSFiddle - React, Tailwind, and code Playground

HTML

<div id=a>
    <div id=b>
    </div>
</div>

CSS

#a {
    width: 400px;
    height: 300px;
    background: #ddd;
}

#b {
    font: 10px Tahoma;
    margin: 0 auto;
    width: 200px;
    height: 300px;
    background: #ccc;
}

JavaScript

$('#b').html('css(\'margin-left\') == ' + $('#b').css('margin-left') + '<br>position().left == ' + $('#b').position().left);