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
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to make x-position of layer absolute and y-position relative?

    In the HMLT I try to give a layer an absolute x-position and the same layer a relative y position. Is such a thing possible at all?

    Here is the HTML:
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    </head>
    <style type="text/css"><!--
    #layer1 { position-x: absolute; position-y: absolute; top: 20px; left: 10px; width: 450px; height: 465px; visibility: visible }
    -->
    </style>

    <body>
    <div id="layer1">
    This is layer1
    </div>
    </body>
    </html>

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    375
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No. You can nest your division:

    Code:
    <style type="text/css">
    #adiv {
    position:absolute;
    left:105px;
    }
    
    #rdiv {
    position:relative;
    top:30px;
    }
    </style>
    Code:
    <div id="adiv"><div id="rdiv">Some Text</div></div>
    Oh, this isn't really javascript.


  •  

    Posting Permissions

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