10 Replies Latest reply on Sep 10, 2007 5:58 AM by peewee_larkin

    Auto position of a layer

    peewee_larkin
      Hi,

      I'm trying to do something that I think must be really simple, but apparently I cannot find any info on it in the help pages!

      I have a main text <div> and a footer<div>.

      Since the content that fills my main text layer is mainly dynamic, the height of the layer depends on the content.

      How can i get the footer to always appear below the main text box?
        • 1. Re: Auto position of a layer
          818g Level 1
          The height of a div always depends on its content unless you define the height in CSS.

          If there is nothing else between your main text div and the footer, and you didn't position your divs otherwise, the footer will naturally appear right below the main text div.
          • 2. Re: Auto position of a layer
            Level 7
            peewee_larkin wrote:
            > Hi,
            >
            > I'm trying to do something that I think must be really simple, but apparently
            > I cannot find any info on it in the help pages!
            >
            > I have a main text <div> and a footer<div>.
            >
            > Since the content that fills my main text layer is mainly dynamic, the height
            > of the layer depends on the content.
            >
            > How can i get the footer to always appear below the main text box?


            DONT use absolutely positioned layers.

            Absolutely positioned means just that. So if you set your footer to be
            say 500px from the top that's where it will remain, even if the contents
            of your main <div> above it is 750px high.



            • 3. Re: Auto position of a layer
              Level 7
              Not when they are positioned absolutely, as OP implies.

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


              "818g" <webforumsuser@macromedia.com> wrote in message
              news:fc0edv$rjl$1@forums.macromedia.com...
              > The height of a div always depends on its content unless you define the
              > height
              > in CSS.
              >
              > If there is nothing else between your main text div and the footer, and
              > you
              > didn't position your divs otherwise, the footer will naturally appear
              > right
              > below the main text div.
              >


              • 4. Re: Auto position of a layer
                peewee_larkin Level 1
                Hi, thanks for all the replies, but i'm still ahving a slight problem with it.

                The problem is that i have 5 <div>s:

                1: Banner
                2: Breadcrumb trail
                3: Navigation Menu
                4: main text
                5: footer

                The problem being that when I take off the absolute position, the main text overlaps the navigation menu which is to the left of it.

                Is there any way that I can make the main text always appear to the right of the nav menu?
                • 5. Re: Auto position of a layer
                  Level 7
                  > Is there any way that I can make the main text always appear to the right
                  > of
                  > the nav menu?

                  Float both left.


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


                  "peewee_larkin" <webforumsuser@macromedia.com> wrote in message
                  news:fc36nk$le$1@forums.macromedia.com...
                  > Hi, thanks for all the replies, but i'm still ahving a slight problem with
                  > it.
                  >
                  > The problem is that i have 5 <div>s:
                  >
                  > 1: Banner
                  > 2: Breadcrumb trail
                  > 3: Navigation Menu
                  > 4: main text
                  > 5: footer
                  >
                  > The problem being that when I take off the absolute position, the main
                  > text
                  > overlaps the navigation menu which is to the left of it.
                  >
                  >


                  • 6. Re: Auto position of a layer
                    peewee_larkin Level 1
                    OK, sorry to keep on!

                    I've floated both the nav menu and the main text, i've removed all position tags, and i've placed the footer <div> tag below the main text <div> in the html and i've put the footer atribute below the main text and nav menu atributes on the css.

                    Now, everything is in place bar the footer! It's appearing just below the breadcrumb trail!

                    Anything else?

                    Thanks guys and gals!
                    • 7. Re: Auto position of a layer
                      Level 7
                      Post a link to your page, please.

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


                      "peewee_larkin" <webforumsuser@macromedia.com> wrote in message
                      news:fc3bat$5fo$1@forums.macromedia.com...
                      > OK, sorry to keep on!
                      >
                      > I've floated both the nav menu and the main text, i've removed all
                      > position
                      > tags, and i've placed the footer <div> tag below the main text <div> in
                      > the
                      > html and i've put the footer atribute below the main text and nav menu
                      > atributes on the css.
                      >
                      > Now, everything is in place bar the footer! It's appearing just below the
                      > breadcrumb trail!
                      >
                      > Anything else?
                      >
                      > Thanks guys and gals!
                      >


                      • 8. Re: Auto position of a layer
                        Dooza (Steve) Level 2
                        Sounds like you need to do something called clearing. Put this before the </div> in your main text:

                        <div style="clear:both;"></div>

                        This isn't the only way to clear your floats, there are others, read this: http://www.positioniseverything.net/easyclearing.html

                        Dooza
                        • 9. Re: Auto position of a layer
                          Level 7
                          peewee_larkin wrote:

                          > OK, sorry to keep on!
                          >
                          > I've floated both the nav menu and the main text, i've removed all position
                          > tags, and i've placed the footer <div> tag below the main text <div> in the
                          > html and i've put the footer atribute below the main text and nav menu
                          > atributes on the css.
                          >
                          > Now, everything is in place bar the footer! It's appearing just below the
                          > breadcrumb trail!


                          add clear: both; to your footer <div> css

                          • 10. Auto position of a layer
                            peewee_larkin Level 1
                            NEW DISCOVERY!!

                            I have just discovered that the prob only occurs in firefox. It works as expected within IE.

                            If you want to take a look the URL is www.theatrepeeps.co.uk/beta/index.html

                            Thanks!

                            Oh, and it is the only page on there at the moment!