Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Resolution Help

  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Resolution Help

    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

    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?

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    <div class="header blue" id="demo-effect-appear">

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •