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

  1. #1

    Default Layer Sizing

    Hi

    Ive been using dreamweaver for a while and just recently started to use layers.
    I think what im trying to do is simple enough, but just cant get it to do what
    i want.

    basically if i create 3 layers
    header
    main content
    footer

    header is 100% wide by 115px positioned at top 0px
    footer is 100% wide by 25px positioned at bottom 0px

    what i want to be able to do is make the "main content" window fill the gap in
    between regardless of the browser window size.
    ive tried using the top and bottom properies but unlike setting width
    properties i dont seem able to set a top position of
    115px so it sits under the header, and then specify a bottom property to 25px
    so it finshes just above the footer. It only seems to want to take notice of 1
    or other of the properties.

    can anyone tell me how to do this.

    Thanks
    All help much apreciated.
    :confused;

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    #Layer1 {
    position:absolute;
    width:100%;
    height:115px;
    z-index:1;
    left: 0px;
    }
    #Layer2 {
    position:absolute;
    width:100%;
    height:25px;
    z-index:2;
    left: 0px;
    bottom: 0px;
    }
    #Layer3 {
    position:absolute;
    width:200px;
    z-index:3;
    left: 0px;
    bottom: 25px;
    overflow: scroll;
    }
    -->
    </style>
    <script 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);
    //-->
    </script>
    </head>

    <body>
    <div id="Layer1">top</div>
    <div id="Layer2">bottom</div>
    <div id="Layer3">
    <p>left</p>
    </div>
    </body>
    </html>

    Chris Snell Guest

  2. Similar Questions and Discussions

    1. activeX axShockwave.loadMovie(Layer, url) ... what is layer for ?
      Hi All, I am working with the shockwave activeX controll loading flash movies into my c# applications. ( I am using falsh mx 2004 Pro) The movies...
    2. Flash layer on top of normal HTML layer
      I am using z-index to put a flash advertisement with a transparent background at the utmost top layer of my webpage. Since I want it to move...
    3. PE2: Selecting and painting a layer having a Hidden Power Tools' layer mask?
      I am making a collage using PE2. I have a background layer (solid color) and then each photo is on its own layer with a layer mask used from the...
    4. Div Layer positioning and sizing
      Hi. I'm currently experiencing a rather weird behavior of Dreamweaver MX. When resizing or moving a DIV-Layer, the values will be set to something...
  3. #2

    Default Re: Layer Sizing

    Here's a sincere suggestion. Take a break from using layers. They will get
    you into trouble if you are not well prepared for them. Read this page -

    [url]http://www.great-web-sights.com/g_layerlaws.asp[/url]
    > basically if i create 3 layers
    > header
    > main content
    > footer
    This shows me that you are headed down the slippery slope already. Using
    layers as a primary layout method is definitely not a best practice. If you
    don't want to use tables, then you need to study CSS methods and focus on
    block vs inline tags, normal flow of code, and how floats work....

    --
    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
    ==================


    "Chris Snell" <webforumsuser@macromedia.com> wrote in message
    news:ek1p7e$qug$1@forums.macromedia.com...
    > Hi
    >
    > Ive been using dreamweaver for a while and just recently started to use
    > layers.
    > I think what im trying to do is simple enough, but just cant get it to do
    > what
    > i want.
    >
    > basically if i create 3 layers
    > header
    > main content
    > footer
    >
    > header is 100% wide by 115px positioned at top 0px
    > footer is 100% wide by 25px positioned at bottom 0px
    >
    > what i want to be able to do is make the "main content" window fill the
    > gap in
    > between regardless of the browser window size.
    > ive tried using the top and bottom properies but unlike setting width
    > properties i dont seem able to set a top position of
    > 115px so it sits under the header, and then specify a bottom property to
    > 25px
    > so it finshes just above the footer. It only seems to want to take notice
    > of 1
    > or other of the properties.
    >
    > can anyone tell me how to do this.
    >
    > Thanks
    > All help much apreciated.
    > :confused;
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    > <title>Untitled Document</title>
    > <style type="text/css">
    > <!--
    > body {
    > margin-left: 0px;
    > margin-top: 0px;
    > margin-right: 0px;
    > margin-bottom: 0px;
    > }
    > #Layer1 {
    > position:absolute;
    > width:100%;
    > height:115px;
    > z-index:1;
    > left: 0px;
    > }
    > #Layer2 {
    > position:absolute;
    > width:100%;
    > height:25px;
    > z-index:2;
    > left: 0px;
    > bottom: 0px;
    > }
    > #Layer3 {
    > position:absolute;
    > width:200px;
    > z-index:3;
    > left: 0px;
    > bottom: 25px;
    > overflow: scroll;
    > }
    > -->
    > </style>
    > <script 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);
    > //-->
    > </script>
    > </head>
    >
    > <body>
    > <div id="Layer1">top</div>
    > <div id="Layer2">bottom</div>
    > <div id="Layer3">
    > <p>left</p>
    > </div>
    > </body>
    > </html>
    >

    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