I created a <div> via javascript that has display:hidden; in its css. I want to make it a block element, but it won't appear. Here is my code.
var fatGooseShop = document.createElement('div');
fatGooseShop.width = canvas.width / 1.5 + "px";
fatGooseShop.height = canvas.height / 1.5 + "px";
fatGooseShop.style.position = "absolute";
fatGooseShop.style.left = "50%";
fatGooseShop.style.top = "50%";
fatGooseShop.style.margin = "-" + (canvas.height / 1.5) / 2 + "px 0px 0px -" + (canvas.width / 1.5) / 2 + "px";
fatGooseShop.style.backgroundColor = "yellow";
fatGooseShop.style.display = "none";
function shop()
{
fatGooseShop.style.display = "block";
}
I call the shop() function from the browser to run it, if that makes a difference.
display: hiddenorvisibility: hidden?