3 Replies Latest reply on Aug 7, 2008 8:20 AM by Newsgroup_User

    Layout Question for mx 2004

    blueman2
      I have used tables previously and want to move on to css. My version of Dreamweaver 2004mx offers the possibility of using Layers (vial the insert Bar) or inserting DIVS. Although they appear easy to place and use (and I realize they are almost the same thing), it's my understanding that most people have moved away from inserting layers. I just wanted to know:

      Should I forget about layers entirely and go directly to inserting DIVS?

      If I do ""Insert Layers" is there a way to convert them to true DIVS?

      Please confirm my understanding that in order to have full control over DIVS, I must first create the DIV by inserting and then create a Style in the external style sheet using the name of the DIV witrh a # in front or is there another way that Dreamweaver 2004mx can recognizes the DIV I created as a style giving me a headstart as CS3 apparently does?
      Thanks
        • 1. Re: Layout Question for mx 2004
          Level 7
          >
          Should I forget about layers entirely and go directly to inserting
          > DIVS?


          You should forget about both, and go study some CSS to understand the
          difference between static and absolutely positioned elements. "Layers" are
          absolutely positioned elements. Divs, and anything without an explicit
          position style are STATIC positioned elements. Using absolute positioning
          is very very troublesome when you don't have a good grasp of both the
          advantages and the disadvantages of the method. If you want to move away
          from tables, you will need to have a good understanding of these principles,
          and especially the notion of 'the normal flow', which is what places all
          static elements on the page.

          >
          If I do "Insert Layers" is there a way to convert them to true
          > DIVS?


          A "layer" is merely a page element that carries a 'position:absolute' style.
          It could be a <div>, a <p>, an <img>, or any of the other HTML tags. The
          version of DW that you are using incorrectly considers that 'layers' are
          <div> tags. This confuses many people, including you, into thinking that
          there is some difference between an absolutely positioned <div> and one that
          is not absolutely positioned. There is not. They are both <div> tags.

          >
          Please confirm my understanding that in order to have full control
          > over
          > DIVS, I must first create the DIV by inserting and then create a Style in
          > the
          > external style sheet using the name of the DIV witrh a # in front or is
          > there
          > another way that Dreamweaver 2004mx can recognizes the DIV I created as a
          > style
          > giving me a headstart as CS3 apparently does?


          Your understanding is muddled.

          A stylesheet contains CSS rules. A CSS rule is composed of a selector
          followed by a series of styles. The selector can be one of three basic
          kinds:

          1. A type selector (e.g., 'body')
          2. A class selector (e.g., '.foo')
          3. An ID selector (e.g., '#special')

          Examples of rules using each would be -

          <html>
          <head>
          <style type="text/css">
          body { color:blue; }
          .foo { font-weight:bold; }
          #special { position:absolute; top:0;left:100px;}
          </style>
          </head>
          <body>
          <p>This text is blue</p>
          <p>This text is blue <span class="foo">but this is bold</span></p>
          <p id="special">This text is absolutely positioned 100px to the right of
          the upper, left-hand corner of the page.</p>
          </body>
          </html>

          Using selectors and rules, you can have absolute control over any element on
          your page.

          Does that help?

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


          "blueman2" <webforumsuser@macromedia.com> wrote in message
          news:g7et9u$ir5$1@forums.macromedia.com...
          >I have used tables previously and want to move on to css. My version of
          > Dreamweaver 2004mx offers the possibility of using Layers (vial the insert
          > Bar)
          > or inserting DIVS. Although they appear easy to place and use (and I
          > realize
          > they are almost the same thing), it's my understanding that most people
          > have
          > moved away from inserting layers. I just wanted to know:
          >
          Should I forget about layers entirely and go directly to inserting
          > DIVS?

          >
          >
          If I do ""Insert Layers" is there a way to convert them to true
          > DIVS?

          >
          >
          Please confirm my understanding that in order to have full control
          > over
          > DIVS, I must first create the DIV by inserting and then create a Style in
          > the
          > external style sheet using the name of the DIV witrh a # in front or is
          > there
          > another way that Dreamweaver 2004mx can recognizes the DIV I created as a
          > style
          > giving me a headstart as CS3 apparently does?

          >
          > Thanks
          >

          • 2. Re: Layout Question for mx 2004
            blueman2 Level 1
            Thanks Murray for the detailed response,

            I may not have explained myself fully. I do have a little understanding of the style sheet and using selectors but I do want to clarify the value of my process . I think I do have my work cut out for me but I have been eliminating using layers and using the insert DIV Tag using an ID. I would then create a style (may be wrong terminology) and use the advanced option to create a new ID selector using #"name of DIV tag". I am then modifying the rules for that selector using the css panel. Is this still not advisable?

            If not, am I better off upgrading to CS3? Does DW now correctly utilize css by inserting "APDIVS" instead of layers or DIVS


            Thanks again
            • 3. Re: Layout Question for mx 2004
              Level 7
              > I would then create a style (may be wrong terminology)

              You would create a rule containing a selector and a set of styles.

              > create a new ID selector using #"name of DIV tag".

              You would specify a new ID selector using "#" and the ID of the <div> tag,
              e.g., #special.

              > Is this still not advisable?

              It's the proper way to do things.

              > If not, am I better off upgrading to CS3?

              If you are moving to CSS layouts, yes, you will be better off moving to CS3
              or even CS4 when it's released.

              > Does DW now correctly utilize css by inserting "APDIVS" instead of layers
              > or DIVS

              There's still confusion here. An "APDIV" *is* an absolutely positioned div
              tag. A "layer" is an absolutely positioned anything.

              The current and next version of DW are consistent with that concept.

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


              "blueman2" <webforumsuser@macromedia.com> wrote in message
              news:g7f2io$oj3$1@forums.macromedia.com...
              > Thanks Murray for the detailed response,
              >
              > I may not have explained myself fully. I do have a little understanding of
              > the
              > style sheet and using selectors but I do want to clarify the value of my
              > process . I think I do have my work cut out for me but I have been
              > eliminating
              > using layers and using the insert DIV Tag using an ID. I would then create
              > a
              > style (may be wrong terminology) and use the advanced option to create a
              > new ID
              > selector using #"name of DIV tag". I am then modifying the rules for that
              > selector using the css panel. Is this still not advisable?
              >
              > If not, am I better off upgrading to CS3? Does DW now correctly utilize
              > css by
              > inserting "APDIVS" instead of layers or DIVS
              >
              >
              > Thanks again
              >