JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="main">
<p id="test"></p>
</div>
</body>
CSS
#main {
width:800px;
height:800px;
position:relative;
}
JavaScript
var mainDiv = $('#main'),
testVal = '';
$('<div class="block"></div>').appendTo(mainDiv).css({
position: 'absolute',
zIndex: 10,
display: 'none',
width: 30,
height: 30,
left: 30,
top: 30
});
testVal = $('.block').css('left');
$('#test').text(testVal);