I have a div in my webpage that I want to resize to the size of the browser. Does anyone know of the right tag to do this?
I have theNode.style.top at 0 pixels and theNode.style.left at 0 pixels. Also right now I have theNode.style.height=770; and theNode.style.width=1255; I want these two sizes to be dynamic to the browser width. Can someone please explain to me how I would do this?
function doMessage ()
{
createGreyLayer();
t=setInterval(“fadeDown()”,50);
}
function createGreyLayer()
{
var theBody = document.getElementsByTagName(“body”)[0];
var theNode = document.createElement(‘div’);
theNode.style.position=’absolute’;
theNode.style.top=’0px’;
theNode.style.left=’0px’;
theNode.style.opacity=0.00;
theNode.style.MozOpacity=0.00;
theNode.style.KhtmlOpacity=0.00;
theNode.style.filter=”alpha(opacity=100)”;
theNode.style.height=770;
theNode.style.width=1255;
theNode.style.backgroundColor=”#c0c0c0″;
theNode.style.display=”block”;
theNode.style.zIndex=’1′;
theNode.id=’GreyLayer’;
theBody.appendChild(theNode);
}