Nesting Layers in Tables

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Nesting Layers in Tables

    I am attempting to "nest" a Layer in a Table. I asume that is not possible.
    What I want is for my layer to move with the table as the table "expands" with
    the size of the broweser window. How can I acomplish this?

    TexasDev Guest

  2. Similar Questions and Discussions

    1. HELP with CSS, Tables and Layers
      Ok, Murray, this is kinda directed to you a bit. First I followed your advice and direction to Projects7 website for navigation help. And I found...
    2. Tables or CSS Layers?
      I'm wondering if I should switch from the time tested and true table layouts to layers - which are much better to work with, not to mention quite...
    3. floating menu problem when using tables instead of layers
      CBrooks: First of all, this is really an urban legend. "Layers" are compatible with all v4+ browsers, but like any other tool, you must know...
    4. layers and tables help
      Steve: You must not put layers into tables. This is sure to cause you problems if you do. Since these <div> tags are absolutely positioned,...
    5. Layers to tables?
      I am a newbie and i have screwed up building my site with layers. www.petigreegifts.com The pages arent displaying correctly in some browsers and...
  3. #2

    Default Re: Nesting Layers in Tables

    It's possible, but definitely not a good idea. One should never put
    absolutely positioned elements directly into table cells.

    Show me your page, please - I need to see what it is you have happening
    there.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "TexasDev" <webforumsuser@macromedia.com> wrote in message
    news:e2m1qv$24p$1@forums.macromedia.com...
    >I am attempting to "nest" a Layer in a Table. I asume that is not possible.
    > What I want is for my layer to move with the table as the table "expands"
    > with
    > the size of the broweser window. How can I acomplish this?
    >

    Murray *ACE* Guest

  4. #3

    Default Re: Nesting Layers in Tables

    I have attached the code. I am creating an online lesson and I wanted to not
    have the "next" button appear until after the click a specific link. The next
    button on other pages is in a table cell.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>NY Diabetics</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if
    ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
    onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
    location.reload();
    }
    MM_reloadPage(true);

    function MM_timelinePlay(tmLnName, myID) { //v1.2
    //Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
    var
    i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,p ropNum,theObj,firstTime=false;
    if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
    tmLn = document.MM_Time[tmLnName];
    if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
    if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+ ')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
    sprite = tmLn[i];
    if (sprite.charAt(0) == 's') {
    if (sprite.obj) {
    numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
    if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1])
    {//in range
    keyFrm=1;
    for (j=0; j<sprite.values.length; j++) {
    props = sprite.values[j];
    if (numKeyFr != props.length) {
    if (props.prop2 == null) sprite.obj[props.prop] =
    props[fNew-firstKeyFr];
    else sprite.obj[props.prop2][props.prop] =
    props[fNew-firstKeyFr];
    } else {
    while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm])
    keyFrm++;
    if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
    if (props.prop2 == null) sprite.obj[props.prop] =
    props[keyFrm-1];
    else sprite.obj[props.prop2][props.prop] =
    props[keyFrm-1];
    } } } } }
    } else if (sprite.charAt(0)=='b' && fNew == sprite.frame)
    eval(sprite.value);
    if (fNew > tmLn.lastFrame) tmLn.ID = 0;
    } }
    }

    function MM_timelineStop(tmLnName) { //v1.2
    //Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
    if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
    if (tmLnName == null) //stop all
    for (var i=0; i<document.MM_Time.length; i++) document.MM_Time[i].ID =
    null;
    else document.MM_Time[tmLnName].ID = null; //stop one
    }

    function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(3);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
    document.MM_Time[0][0].obj = document["Layer1"];
    else if (ns5)
    document.MM_Time[0][0].obj = document.getElementById("Layer1");
    else
    document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] :
    null;
    document.MM_Time[0][0].keyFrames = new Array(1, 5);
    document.MM_Time[0][0].values = new Array(2);
    document.MM_Time[0][0].values[0] = new Array("hidden","visible");
    document.MM_Time[0][0].values[0].prop = "visibility";
    if (!ns4)
    document.MM_Time[0][0].values[0].prop2 = "style";
    if (ns5)
    document.MM_Time[0][0].values[1] = new Array("349px", "349px",
    "349px", "349px", "349px");
    else
    document.MM_Time[0][0].values[1] = new Array(349,349,349,349,349);
    document.MM_Time[0][0].values[1].prop = "width";
    if (!ns4)
    document.MM_Time[0][0].values[1].prop2 = "style";
    document.MM_Time[0][1] = new String("behavior");
    document.MM_Time[0][1].frame = 6;
    document.MM_Time[0][1].value = "MM_timelineStop()";
    document.MM_Time[0][2] = new String("sprite");
    document.MM_Time[0][2].slot = 2;
    if (ns4)
    document.MM_Time[0][2].obj = document["Layer2"];
    else if (ns5)
    document.MM_Time[0][2].obj = document.getElementById("Layer2");
    else
    document.MM_Time[0][2].obj = document.all ? document.all["Layer2"] :
    null;
    document.MM_Time[0][2].keyFrames = new Array(1, 5);
    document.MM_Time[0][2].values = new Array(1);
    document.MM_Time[0][2].values[0] = new Array("hidden","visible");
    document.MM_Time[0][2].values[0].prop = "visibility";
    if (!ns4)
    document.MM_Time[0][2].values[0].prop2 = "style";
    document.MM_Time[0].lastFrame = 6;
    for (i=0; i<document.MM_Time.length; i++) {
    document.MM_Time[i].ID = null;
    document.MM_Time[i].curFrame = 0;
    document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
    }
    //-->
    </script>
    </head>

    <body bgcolor="#CCCCCC">
    <div id="Layer1" style="position:absolute; left:103px; top:367px; width:349px;
    height:43px; z-index:1; visibility: hidden;"><font face="Arial, Helvetica,
    sans-serif">Situs
    members are members whose contract for insurance is in a certain state. In
    this
    it would be the state of New York.</font></div>



    <table height="75" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="15" bgcolor="#0000FF">&nbsp; </td>
    <td bgcolor="#0000FF"><img src="../graphics/logo_small_white.gif"
    width="157" height="52"></td>
    </tr>
    </table>
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="75" bgcolor="#FF9900">&nbsp;</td>
    <td valign="top">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="15">
    <tr>
    <td valign="top"><p align="center"><font size="5" face="Arial,
    Helvetica, sans-serif"><strong>NY
    Diabetic Mandate</strong></font></p>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td valign="top" width="64%"><p><font face="Arial, Helvetica,
    sans-serif">Diabetic
    supplies for <a href="#"
    onClick="MM_timelinePlay('Timeline1')">NY
    Situs Members</a> on fully insured PPO plans will pay with
    the medical copayment if the member has both medical and
    pharmacy
    coverage though Aetna. This is occurring because current
    medical
    copayments are lower than the pharmacy
    copayments.</font></p>
    <p><font size="3" face="Arial, Helvetica, sans-serif">For a
    definitinion of Situs Members, click on the
    link.</font></p>
    </td>
    <td width="36%"><div align="right"><img
    src="../graphics/various/liberty.png" width="250" height="325"></div></td>
    </tr>
    </table>
    <p><font face="Arial, Helvetica, sans-serif">Click the NEXT button
    to continue.</font></p>
    <table width="100%" border="1" cellspacing="0" cellpadding="5">
    <tr>
    <td width="25%"> <font face="Arial, Helvetica,
    sans-serif"><img name="menu" src="../graphics/buttons/menu.gif" width="75"
    height="30" border="0" alt=""></font></td>
    <td width="25%"><div align="center"><font face="Arial,
    Helvetica, sans-serif">Page
    2 </font></div></td>
    <td width="25%"><div align="center"><font face="Arial,
    Helvetica, sans-serif">Navigation
    Instructions</font></div></td>
    <td width="25%"><div align="right">
    <table width="100%" border="1" cellspacing="0"
    cellpadding="5">
    <tr>
    <td width="50"> <img name="lft_arrow"
    src="../graphics/buttons/lft_arrow.gif" width="50" height="30" border="0"
    alt=""></td>
    <td> <font color="#CCCCCC">a</font></td>
    <td width="50" valign="top"><div align="left"> <span
    id="Layer2" style="position:absolute; z-index:2; visibility: hidden; overflow:
    auto; width: 50px; height: 30px;"><a href="nydiabetic_sc04.htm"><img
    name="rt_arrow" src="../graphics/buttons/rt_arrow.gif" width="50" height="30"
    border="0" alt=""></a></span></div>
    </td>
    </tr>
    </table>
    </div></td>
    </tr>
    </table>
    <p> </p>
    </td>
    </tr>
    </table></td>
    </tr>
    </table>
    </body>
    </html>

    TexasDev Guest

  5. #4

    Default Re: Nesting Layers in Tables

    Why are you using timelines here instead of a simple show/hide?

    Also, this code is trouble -

    <td width="50" valign="top"><div align="left"> <span id="Layer2"
    style="position:absolute; z-index:2; visibility: hidden; overflow: auto;
    width: 50px; height: 30px;"><a href="nydiabetic_sc04.htm"><img
    name="rt_arrow" src="../graphics/buttons/rt_arrow.gif" width="50"
    height="30" border="0" alt=""></a></span></div>
    </td>

    That's an absolutely positioned element in a table cell. It should not be
    there. I assume you have it in there so that it moves with the table? If
    that is the case, then just change its position value from absolute to
    relative, and you should be OK with this.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================



    Murray *ACE* Guest

  6. #5

    Default Re: Nesting Layers in Tables

    this is first time I have attempted to use dreamweaver soley for the animation
    or interactiveness. I usually use Flash. ---- I do not know about the show
    hide feature. I will have to look that one up.

    TexasDev Guest

  7. #6

    Default Re: Nesting Layers in Tables

    It's a standard DW behavior, in the Behaviors panel.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "TexasDev" <webforumsuser@macromedia.com> wrote in message
    news:e2nt9b$g5d$1@forums.macromedia.com...
    > this is first time I have attempted to use dreamweaver soley for the
    > animation
    > or interactiveness. I usually use Flash. ---- I do not know about the
    > show
    > hide feature. I will have to look that one up.
    >

    Murray *ACE* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139