I am creating an application where I need to style a div as follows using javascript;
var div = document.createElement("div");
div.innerHTML = "xxxxxxxxxx";
div.style.display = "block";
div.style.width = "100%";
div.style.height = "10%";
div.style.background = "#f2dede";
div.style.color = "black";
div.style.position = "fixed";
div.style.padding = "20px";
div.style.top = "50%";
div.style.border = "5px solid #ebccd1";
//div.style.border-radius = "20px";
//div.style.text-align = "center";
//div.style.webkit-border-radius = "20px 0 0 20px";
//div.style.moz-border-radius = "20px 0 0 20px";
document.body.appendChild(div);
The problem I am facing is that none of the commented lines above will work. As soon as I uncomment them the div won't show.
What could be the cause of this?