5 Replies Latest reply on May 10, 2006 12:21 PM by Newsgroup_User

    Table alignment

    rbaker1 Level 1
      When I create a new doc. and insert a new table it is not lined to the absolute top of the page. How should I go about lining my table to the top of the page so that it isn’t any gap @ the top of the page when view in the browser. I have attached a sample file with fake text and fake image place holder just to get an idea what I am talking about. Any help will be greatly appreciated.


        • 1. Re: Table alignment
          Level 7
          Link to an external stylesheet (using DW's CSS editor), or embed a
          stylesheet in your code (between <head> and </head> with the following
          style in it (embedded shown for cut-n-paste convenience) (assuming you want
          zero margins) -

          <style type="text/css">
          <!--
          body { margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0;
          padding:0; }
          -->
          </style>
          (when the value is zero, units are not required)

          you could also try

          body { margin: 0 0 0 0; padding:0; }

          or

          body { margin: 0; padding:0; }

          as a shorthand method.

          This will take care of the margins in IE4+ and NN6+....

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


          "rbaker1" <webforumsuser@macromedia.com> wrote in message
          news:e3t9so$a42$1@forums.macromedia.com...
          > When I create a new doc. and insert a new table it is not lined to the
          > absolute
          > top of the page. How should I go about lining my table to the top of the
          > page
          > so that it isn?t any gap @ the top of the page when view in the browser. I
          > have
          > attached a sample file with fake text and fake image place holder just to
          > get
          > an idea what I am talking about. Any help will be greatly
          > appreciated.
          >


          • 2. Re: Table alignment
            kojakz
            Hi,

            In your body tag add the the following to make it stick to the top of the page
            topmargin = "0"
            marginheight="0"

            If you want it to stick to the left too then add
            leftmargin="0"
            marginwidth="0"

            For e.g. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

            This will make it it start right from the top and left of the page
            marginwidth and marginheight works with netscape while the other 2 work with IE...
            Hope this helps
            Adios

            Zarir Gandhi
            • 3. Re: Table alignment
              Level 7
              Invalid code, however. And don't make the mistake of looking at the page in
              any modern browser, or you'll see that these IE/NN4x proprietary attributes
              are not supported.

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


              "kojakz" <webforumsuser@macromedia.com> wrote in message
              news:e3tbap$cko$1@forums.macromedia.com...
              > Hi,
              >
              > In your body tag add the the following to make it stick to the top of the
              > page
              > topmargin = "0"
              > marginheight="0"
              >
              > If you want it to stick to the left too then add
              > leftmargin="0"
              > marginwidth="0"
              >
              > For e.g. <body leftmargin="0" topmargin="0" marginwidth="0"
              > marginheight="0">
              >
              > This will make it it start right from the top and left of the page
              > marginwidth and marginheight works with netscape while the other 2 work
              > with
              > IE...
              > Hope this helps
              > Adios
              >
              > Zarir Gandhi
              >
              >


              • 4. Re: Table alignment
                kojakz Level 1
                Am seeing this code in IE 6.. works fine for me.. always have worked fine so far.. no trouble...
                • 5. Re: Table alignment
                  Level 7
                  Look at it in Firefox, or on the Mac....

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


                  "kojakz" <webforumsuser@macromedia.com> wrote in message
                  news:e3tedp$hbk$1@forums.macromedia.com...
                  > Am seeing this code in IE 6.. works fine for me.. always have worked fine
                  > so far.. no trouble...
                  >