JSFiddle - React, Tailwind, and code Playground
HTML
<input type="submit" name="cssandcreate" id="cssandcreate" value="css" onclick="css();"/>
JavaScript
function css()
{
var element = document.createElement('div');
element.id = "someID";
document.body.appendChild(element);
element.appendChild(document.createTextNode('hello this is javascript work'));
// this properties are work
document.getElementById('someID').style.zIndex='3';
document.getElementById('someID').style.color='rgb(255,255,0)';
document.getElementById('someID').style.background='rgb(0,102,153)';
document.getElementById('someID').style.width='700px';
document.getElementById('someID').style.height='200px';
//this are not work
document.getElementById('someID').style.left='500px';
document.getElementById('someID').style.top='90px';
}