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 5 of 5

Thread: layer problem

  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    433
    Thanks
    3
    Thanked 0 Times in 0 Posts

    layer problem

    I want to put a layer in my page
    <div id="myDiv"
    style="position:absolute; clip:rect(0px 1280px 15px 0px);; left: 124px; top: 208px; width: 390px; height: 13px; visibility: visible; overflow: visible">
    </div>

    The problem is that the explorer and the netscape shows the layer in different positions....what i must do?


    aH!!do u know what is this?
    <LINK REL="SHORTCUT ICON" HREF="Face01.ico">

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (0px 1280px 15px 0px);; <--

    That 2nd semicolon may be causing problems

    Oh and that <LINK> tag is for the favorite icon (appears next to link when added to favorites/bookmarked) See this page for more info
    Last edited by beetle; 08-26-2002 at 05:37 PM.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Posts
    433
    Thanks
    3
    Thanked 0 Times in 0 Posts

    nop

    nop that is ok!!something else/

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Atlanta, GA.
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I put that code in a blank document the layer appears at the same position in NS4 and IE5.

    Are you sure it is the layer that is at the wrong position and not the fact that NS4 may use a different font size than IE so when there is content under the layer it appears to be in a different position?
    The answer does not come from thinking outside the box, it comes from realizing the truth :-
    "There Is No Box". [JavaScript Gadgets'n'Gizmos][JavaScript-FX]

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Navigator ignores height set via CSS. The only way to get height (and other attributes) to render correctly is to use the HTML tags themselves; this is the way NS Layers were designed (the CSS was tacked on at the last minute):

    <html>
    <head>
    <title>untitled</title>
    </head>
    <body>
    <layer id="myDiv_NS" left="124" top="208" width="390" height="13"
    clip="0,0,1280,15" bgcolor="blue" visibility="show">
    </layer>
    <nolayer>
    <div id="myDiv"
    style="position:absolute; clip:rect(0px 1280px 15px 0px); left: 124px; top: 208px; width: 390px; height: 13px; background:blue; visibility: visible; overflow: visible">
    </div>
    </nolayer>
    </body>
    </html>

    Note how NS4 reads clip values: l,t,r,b instead of t,r,b,l - and that the bgcolor of an 'overclipped' side goes with it; very annoying.

    See how nicely Layer HTML works:

    <html>
    <head>
    <title>untitled</title>
    </head>
    <body bgcolor="black">
    <layer left="0" top="80%" width="100%" height="20%" bgcolor="#880000"></layer>
    <layer left="20%" top="60%" width="80%" height="20%" bgcolor="#aa0000"></layer>
    <layer left="40%" top="40%" width="60%" height="20%" bgcolor="#bb0000"></layer>
    <layer left="60%" top="20%" width="40%" height="20%" bgcolor="#cc0000"></layer>
    <layer left="80%" top="0" width="20%" height="20%" bgcolor="#dd0000"></layer>
    </body>
    </html>
    Last edited by adios; 08-27-2002 at 04:16 AM.


  •  

    Posting Permissions

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