...

View Full Version : Resolution Help



usted
02-12-2007, 11: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?

Philip M
02-12-2007, 02:03 PM
<div class="header blue" id="demo-effect-appear">

- (hyphen) is minus
Change to _ (underscore).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum