usted
02-12-2007, 10:52 AM
Hey everybody, I am trying to change the top-margin in a div.
The top-margin should be the browser-resolutions height multiply with 0.618 minus 20px.
I am not very good at JavaScript, so please help me out here :) I have almost tried everything :confused:
This is my scource:
<script language="JavaScript" type="text/javascript">
document.getElementById("demo-effect-appear").style.marginTop="document.write(+screen.height*0.61-20)";
</script>
</head>
<body>
<div class="header blue" id="demo-effect-appear">
</div>
Can somone tell my what is wrong?
The top-margin should be the browser-resolutions height multiply with 0.618 minus 20px.
I am not very good at JavaScript, so please help me out here :) I have almost tried everything :confused:
This is my scource:
<script language="JavaScript" type="text/javascript">
document.getElementById("demo-effect-appear").style.marginTop="document.write(+screen.height*0.61-20)";
</script>
</head>
<body>
<div class="header blue" id="demo-effect-appear">
</div>
Can somone tell my what is wrong?