I need a way of specifying the left property of a div tag using javascript. I want the tag centered(along with it's contents) on the screen regardless of the resolution. The page should occupy the entire screen when the resolution is at 640X480. right now i have...
<div id="Layer8" align="center" style="position:absolute; left:0px; top:70px; width:640; height:30px; z-index:8; background-color: white; layer-background-color: white; border: 1px none #000000">
in the left property i need a function which will perform the following calculation (screen.width - 640) / 2 and use the result to specify how far left the div tag should be placed.
any help is greatly appreciated!!!
<div id="Layer8" align="center" style="position:absolute; left:0px; top:70px; width:640; height:30px; z-index:8; background-color: white; layer-background-color: white; border: 1px none #000000">
in the left property i need a function which will perform the following calculation (screen.width - 640) / 2 and use the result to specify how far left the div tag should be placed.
any help is greatly appreciated!!!