1 Reply Latest reply on Sep 25, 2008 7:44 AM by Newsgroup_User

    Centering site in viewing window using layers

    Allen_Mac
      I am a graphic designer who uses Dreamweaver 8 to build web sites. I normally build sites using layers or nested layers. When I build a site with the design centred in the middle of the viewing window how do I make the layers move so that they stay centred when the viewing window is resized.
        • 1. Re: Centering site in viewing window using layers
          Level 7
          > I normally build sites using layers or nested layers.

          The worst possible choice, I might add, although one that's very popular
          with those who come into DW from the graphic design field, and who believe
          that they can do web pages without learning HTML. Be aware that fully 20%
          of all posts on this forum (about 200 - 600 a day!) are posts resulting from
          the problems that arise from the use of this layout methodology you have
          chosen.

          > how do I make the layers move so
          > that they stay centred when the viewing window is resized.

          There is only one way to do this reliably.

          Change this -

          </head>

          to this -

          <style type="text/css">
          #wrapper { width:760px; margin:0 auto;position:relative; }
          /* 760px will display on an 800px screen maximized browser window without */
          /* horizontal scrollbars. */
          </style>
          </head>

          change this -

          <body ...>
          (the ellipsis represents any other attributes that might be mentioned in the
          body tag, and SHOULD NOT BE INCLUDED EXPLICITLY!)

          to this -

          <body ...>
          <div id="wrapper">

          and this -

          </body>

          to this -

          <!-- /wrapper -->
          </div>
          </body>

          and see if that helps.



          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "Allen Mac" <webforumsuser@macromedia.com> wrote in message
          news:gbg4st$p$1@forums.macromedia.com...
          >I am a graphic designer who uses Dreamweaver 8 to build web sites. I
          >normally
          > build sites using layers or nested layers. When I build a site with the
          > design
          > centred in the middle of the viewing window how do I make the layers move
          > so
          > that they stay centred when the viewing window is resized.
          >