16 Replies Latest reply on Sep 20, 2008 9:52 AM by Newsgroup_User

    static v absolute position

    Karlhevera Level 1
      Many comments have been made elsewhere about the wisdom of using 'absolute', particularly when a crossbrowsers are considered and user's adjustment of text size..to quote one problem...

      So, in order to eliminate these glitches from my pages, I should apparently convert to 'static'..
      What would be the steps to take to accomplish this without too much hassle. I do have a lot of CSS code, which, I guess, when adjusted would take care of some of the problems.
      Is there a tutorial/publication which deals with this procedure?
        • 1. Re: static v absolute position
          Level 7
          Any element without an explicit positioning style is static, by default,
          e.g.,

          <html>
          <head>
          </head>
          <body>
          <div>This is a static div</div>
          <p>This is a static paragraph</p>
          </body>

          > So, in order to eliminate these glitches from my pages, I should
          > apparently
          > convert to 'static'..

          That's a gross oversimplification. You should re-design your layout so that
          the page elements are placed on the page as dictated by THE NORMAL FLOW,
          mediated through the CSS rules. Simply taking a page that has been designed
          using absolutely positioned elements, and converting the absolute position
          to static position (by removing the positioning altogether) will most likely
          not work very well. I think you understand this, but I'm not sure.

          > I do have a lot of CSS code

          This, too, is a bit troubling. Having a lot of CSS often means inefficient
          use of rules and selectors.

          In general, you don't need many custom classes. And, in fact, they
          make your life more difficult when you come back to maintain the page a year
          later. Use ID selectors and create descendent selector rules. An example -

          #maintable { .... }
          #maintable td { .... }
          #maintable td table { ... }

          each of those rules would apply explicitly to a) this table -

          <table id="maintable">,

          and b) this cell -

          <table id="maintable">
          <tr>
          <td>...</td>
          </tr>
          </table> (and all others in that table),

          and to this table -

          <table id="maintable">
          <tr>
          <td>
          <table>
          <tr>
          <td></td>
          </tr>
          </table>
          </td>
          </tr>
          </table>

          Then you could use this rule -

          #maintable table td.special { .... }

          to apply to this cell explicitly -

          <table id="maintable">
          <tr>
          <td>
          <table>
          <tr>
          <td class="special">this one</td>
          <td>but not this one</td>
          <td class="special">this one</td>
          <td>but not this one</td>
          </tr>
          </table>
          </td>
          </tr>
          </table>

          Also, it is not necessary to define default styles, e.g.,
          font-weight:normal, unless you are trying to counteract some cascading rule.
          Further, it is not necessary to define styles that are normally inherited,
          e.g.,

          body { font-family: Calibri, verdana, arial, helvetica, sans-serif; }

          will style all characters used on the page, no matter where they are located
          or in which container.

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


          "Karlhevera" <webforumsuser@macromedia.com> wrote in message
          news:gaapos$2pc$1@forums.macromedia.com...
          > Many comments have been made elsewhere about the wisdom of using
          > 'absolute',
          > particularly when a crossbrowsers are considered and user's adjustment of
          > text
          > size..to quote one problem...
          >
          > So, in order to eliminate these glitches from my pages, I should
          > apparently
          > convert to 'static'..
          > What would be the steps to take to accomplish this without too much
          > hassle.
          > I do have a lot of CSS code, which, I guess, when adjusted would take care
          > of
          > some of the problems.
          > Is there a tutorial/publication which deals with this procedure?
          >
          >

          • 2. Re: static v absolute position
            Karlhevera Level 1
            Many thanks for really informative reply. Will have to study and digest.

            Is there a good textbook that I could get and study at my own pace? Before I do any changes. Those I have do not, for example, deal with the problems one might encounter when the text size is changed and how to ensure this does not happen. Comments have been made elsewhere that I might be a slow learner...-:)...All this HTML and XHTML, strict or not, is just a hobby on mine. I don't get paid for any of it, as someone thought, in horror, that I could possibly charge and perhaps even get paid for such rubbish..;-) . I am of the generation when IT was DP and we had punch cards to work with... You know, those little oblong cards, with one corner cut off, full of holes.... You may find an example in an IT museum...With fondness I remember my first IBM XT and DOS 1, when Bill Gates was just a name in the local phone book... All of the many data processing applications I wrote over the years, had just 80 columns and 25 lines to display anything. No colours, fonts, or such fancy stuff. Even then, there were well established rules relating to design of input screens and presentation of data on screen...Even more difficult if the input screens had to follow a layout of a well established form, used Worldwide, by say, a visa applicant.... Mouse(?), UGI and Windows all came much later..

            Whereas, HTML is more of an art, where the designer is absolutely free to do as he wishes. Resulting in, as we can see many beautiful, and at times, rather sad, ugly pages on the web.
            You guys may think that I am asking rather pedestrian questions. That may be so, but only when I cannot figure it out myself (and I have all the time I need, to do so) but most importantly, often cannot find an answer elsewhere...
            that's why I am looking for a good textbook(s) which not only explains how to do it, but WHY and what to do if it does not work - as often it does not...

            • 3. Re: static v absolute position
              Level 7
              Karlhevera wrote:
              > You guys may think that I am asking rather pedestrian questions. That may be
              > so, but only when I cannot figure it out myself (and I have all the time I
              > need, to do so) but most importantly, often cannot find an answer elsewhere...
              > that's why I am looking for a good textbook(s) which not only explains how to
              > do it, but WHY and what to do if it does not work - as often it does not...

              There are many that detail the how, and a few that detail the why, but I
              don't think I have seen any that deal with the fixing.

              I started my CSS journey when I bought Web Design in a Nutshell, this
              had a chapter called Emerging Technologies, and this was back in 1997...
              fast forward to 2002 and I bought 2 books by Eric Meyer, CSS: The
              Definitive Guide and Eric Meyer on CSS. The first one being a reference,
              and the second one showing me what was possible... a load of designs
              with step by step instructions.

              But, I learnt most of what I know from trial and error, and asking for
              help here. I seem to have memories of Osgood helping me overcome most of
              my biggest hurdles... thank you again Osgood! But there are plenty of
              helpful people here who have also helped, and I thank them again too!

              Dooza
              • 4. Re: static v absolute position
                Karlhevera Level 1
                Dooza: Am now weeding through Schultz&Cook's Beginning HTML with CSS and XHTML.. But Murray said that CSS is not that good an idea, when later on a page needs to be edited... thought that if there were css files, t would have been easier to correct sitewide...
                • 5. Re: static v absolute position
                  Level 7
                  > But Murray said that CSS is not that good an idea, when later on a page
                  > needs to be edited...

                  I said what?

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


                  "Karlhevera" <webforumsuser@macromedia.com> wrote in message
                  news:gadvmk$pp7$1@forums.macromedia.com...
                  > Dooza: Am now weeding through Schultz&Cook's Beginning HTML with CSS and
                  > XHTML.. But Murray said that CSS is not that good an idea, when later on a
                  > page
                  > needs to be edited... thought that if there were css files, t would have
                  > been
                  > easier to correct sitewide...
                  >

                  • 6. Re: static v absolute position
                    Level 7
                    Karlhevera wrote:
                    > Dooza: Am now weeding through Schultz&Cook's Beginning HTML with CSS and
                    > XHTML.. But Murray said that CSS is not that good an idea, when later on a page
                    > needs to be edited... thought that if there were css files, t would have been
                    > easier to correct sitewide...

                    What did you really mean to say? I am sure you must be confused.

                    Dooza
                    • 7. Re: static v absolute position
                      Karlhevera Level 1
                      That's what I understood:
                      This, too, is a bit troubling. Having a lot of CSS often means inefficient
                      use of rules and selectors. Or misunderstood?

                      Dooza: Have found 2 Meyer's books at Amazon. The one you refer to from 2002. Since then, he wrote another one 'More Eric Meyer on CSS', published in May 2004. Would the 2004 book be more up to date, or just more possibilities?
                      • 8. Re: static v absolute position
                        Level 7
                        > That's what I understood:
                        > This, too, is a bit troubling. Having a lot of CSS often means inefficient
                        > use of rules and selectors. Or misunderstood?

                        I think you misunderstood. Go through your CSS, whether embedded or
                        external. Count how many custom class selectors you have used. If it's
                        more than about 10, you are *probably* not using your CSS very efficiently.
                        That's what I meant.

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


                        "Karlhevera" <webforumsuser@macromedia.com> wrote in message
                        news:gaecnl$alk$1@forums.macromedia.com...
                        > That's what I understood:
                        > This, too, is a bit troubling. Having a lot of CSS often means inefficient
                        > use of rules and selectors. Or misunderstood?
                        >
                        > Dooza: Have found 2 Meyer's books at Amazon. The one you refer to from
                        > 2002.
                        > Since then, he wrote another one 'More Eric Meyer on CSS', published in
                        > May
                        > 2004. Would the 2004 book be more up to date, or just more possibilities?
                        >

                        • 9. static v absolute position
                          Karlhevera Level 1
                          OK..NOW I see the light at the end of the tunnel... Obviously, misunderstood....
                          MURRAY: by 10 or so CSS styles, I guess you mean ten or so groups, ie style for all the tables, detail pages, gallery, etc..grouped together?
                          • 10. Re: static v absolute position
                            mahendra rajeshirke Level 2
                            using css style with div to div alone or tag to tag is rather difficult than using css with linked/mixed style like : #maintable table td.special { .... }
                            • 11. Re: static v absolute position
                              Level 7
                              .oO(Karlhevera)

                              >OK..NOW I see the light at the end of the tunnel...

                              Be careful - it might be an oncoming train. ;)

                              Micha
                              • 12. Re: static v absolute position
                                Karlhevera Level 1
                                Micha: Thank you for your concern about my safety... But, as long as I do my surfing here, I should be pretty safe... even if I do get the odd prickly comment from members....:-)
                                • 13. Re: static v absolute position
                                  Level 7
                                  Karlhevera wrote:
                                  > Dooza: Have found 2 Meyer's books at Amazon. The one you refer to from 2002.
                                  > Since then, he wrote another one 'More Eric Meyer on CSS', published in May
                                  > 2004. Would the 2004 book be more up to date, or just more possibilities?

                                  I would say that its a continuation on what he has already done, so I
                                  would get both.

                                  Dooza
                                  • 14. Re: static v absolute position
                                    Level 7
                                    I've never been that lucky. For me the light has always been a fireball from
                                    an explosion.

                                    --

                                    Walt


                                    "Michael Fesser" <netizen@gmx.de> wrote in message
                                    news:isumc4hlt20kc528rb7849ecnao4bndagf@4ax.com...
                                    > .oO(Karlhevera)
                                    >
                                    >>OK..NOW I see the light at the end of the tunnel...
                                    >
                                    > Be careful - it might be an oncoming train. ;)
                                    >
                                    > Micha


                                    • 15. Re: static v absolute position
                                      Level 7
                                      *LOL*

                                      "Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
                                      news:gb1fj8$rsv$1@forums.macromedia.com...
                                      > I've never been that lucky. For me the light has always been a fireball
                                      from
                                      > an explosion.
                                      >
                                      > --
                                      >
                                      > Walt
                                      >
                                      >
                                      > "Michael Fesser" <netizen@gmx.de> wrote in message
                                      > news:isumc4hlt20kc528rb7849ecnao4bndagf@4ax.com...
                                      > > .oO(Karlhevera)
                                      > >
                                      > >>OK..NOW I see the light at the end of the tunnel...
                                      > >
                                      > > Be careful - it might be an oncoming train. ;)
                                      > >
                                      > > Micha
                                      >
                                      >


                                      • 16. Re: static v absolute position
                                        Level 7
                                        .oO(Walt F. Schaefer)

                                        >I've never been that lucky. For me the light has always been a fireball from
                                        >an explosion.

                                        At least you don't have to go to the tanning salon anymore.

                                        Micha