Center a page vertically

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Unknown User

    Center a page vertically

    Yet another question about vertical centering: How can I center a page
    vertically?

    I have searched on Google and didn't find anything that works at least on
    IE, Opera and Mozilla:

    Or using a table: http://www.quirksmode.org/css/centering.html

    Is there a way to do it and that works in Opera, IE and Mozilla?
    Thanks,

    --
    Boost the visibility of your web site in Google!


    Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

    http://www.auriance.com - http://www.auriance.net
  • Lauri Raittila

    #2
    Re: Center a page vertically

    in comp.infosystem s.www.authoring.stylesheets, Unknown User wrote:[color=blue]
    > Yet another question about vertical centering: How can I center a page
    > vertically?[/color]

    There is number of ways, the ones that work on IE require negative
    margin, and thus are almost guaranteed to cause inaccessible content.
    [color=blue]
    > Is there a way to do it and that works in Opera, IE and Mozilla?
    > Thanks,[/color]

    Yes, but it causes content to be inaccessible very easily in IE.


    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Utrecht, NL.

    Comment

    • me

      #3
      Re: Center a page vertically

      "Unknown User" <me@privacy.net > wrote in message
      news:op.snz7vcf hr3xrds@cinza.. .[color=blue]
      > Yet another question about vertical centering: How can I center a page
      > vertically?
      >
      > I have searched on Google and didn't find anything that works at least on
      > IE, Opera and Mozilla:
      > http://milov.nl/code/css/verticalcenter.html
      > Or using a table: http://www.quirksmode.org/css/centering.html
      >
      > Is there a way to do it and that works in Opera, IE and Mozilla?
      > Thanks,[/color]

      This may not be what you wanted but the following works in IE. I don't use
      other browsers so I can't say what will happen in them.
      Good Luck,
      me

      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"
      align="center">
      <tr>
      <td>
      <div align="center"> stuff centered vertically and horizontally</div>
      </td>
      </tr>
      </table>


      Comment

      • Roy Reed

        #4
        Re: Center a page vertically


        "Unknown User" <me@privacy.net > wrote in message
        news:op.snz7vcf hr3xrds@cinza.. .[color=blue]
        > Yet another question about vertical centering: How can I center a page
        > vertically?[/color]



        --
        Must fly

        Roy

        Based in Clapham in South London and Wadebridge in Cornwall, ReedDesign is a specialist Website design company supplying either design services or consultancy to agencies and end users.



        Comment

        • me

          #5
          Re: Center a page vertically

          "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
          news:423ff4d5$0 $8754$db0fefd9@ news.zen.co.uk. ..[color=blue]
          >
          > "Unknown User" <me@privacy.net > wrote in message
          > news:op.snz7vcf hr3xrds@cinza.. .[color=green]
          > > Yet another question about vertical centering: How can I center a page
          > > vertically?[/color]
          >
          > http://apptools.com/examples/tableheight.php
          >
          > --
          > Must fly
          > Roy[/color]

          Please understand that my comments here are not an aspersion on you Mr.
          Reed. From what I've seen yours is the first answer other than my own with
          any hope of succeeding.

          The solution offered at apptools.com has some problems. It doesn't work in
          IE for Mac. This isn't a problem for me since I only design for IE users on
          Windows but if accessibility for all is the author's goal then his solution
          is a failure.

          The DTD on the example pages is:

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">

          Someone correct me if I'm wrong but this isn't strict is it? If the author's
          goal was to avoid quirks mode and use a strict DTD then why didn't he do so
          in his own examples?

          In the first three examples there is a border around the table but not in
          the last example, this inconsistency (oversight?) does not inspire
          confidence.
          Signed,
          me


          Comment

          • Roy Reed

            #6
            Re: Center a page vertically


            "me" <anonymous@_.co m> wrote in message
            news:1140c1s4ab gftdd@corp.supe rnews.com...[color=blue]
            > "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
            > news:423ff4d5$0 $8754$db0fefd9@ news.zen.co.uk. ..[color=green]
            >>
            >> "Unknown User" <me@privacy.net > wrote in message
            >> news:op.snz7vcf hr3xrds@cinza.. .[color=darkred]
            >> > Yet another question about vertical centering: How can I center a page
            >> > vertically?[/color]
            >>
            >> http://apptools.com/examples/tableheight.php
            >>
            >> --
            >> Must fly
            >> Roy[/color]
            >
            > Please understand that my comments here are not an aspersion on you Mr.
            > Reed. From what I've seen yours is the first answer other than my own
            > with
            > any hope of succeeding.
            >
            > The solution offered at apptools.com has some problems. It doesn't work in
            > IE for Mac. This isn't a problem for me since I only design for IE users
            > on
            > Windows but if accessibility for all is the author's goal then his
            > solution
            > is a failure.
            >
            > The DTD on the example pages is:
            >
            > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            > "http://www.w3.org/TR/html4/loose.dtd">
            >
            > Someone correct me if I'm wrong but this isn't strict is it? If the
            > author's
            > goal was to avoid quirks mode and use a strict DTD then why didn't he do
            > so
            > in his own examples?
            >
            > In the first three examples there is a border around the table but not in
            > the last example, this inconsistency (oversight?) does not inspire
            > confidence.
            > Signed,
            > me[/color]

            Here's an example based on the AppTools page in XHTML Strict which validates
            and works in everything I've tested it in on PC - IE5, 5.5 and 6, FireFox,
            Moz, NN7 and Opera 7. I don't have access to a Mac at present.



            And here's a different way to do it. Also XHTML Strict. Also validates.



            --
            Must fly

            Roy

            Based in Clapham in South London and Wadebridge in Cornwall, ReedDesign is a specialist Website design company supplying either design services or consultancy to agencies and end users.



            Comment

            • me

              #7
              Re: Center a page vertically

              "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
              news:42405fe4$0 $8750$db0fefd9@ news.zen.co.uk. ..[color=blue]
              >
              > "me" <anonymous@_.co m> wrote in message
              > news:1140c1s4ab gftdd@corp.supe rnews.com...[color=green]
              > > "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
              > > news:423ff4d5$0 $8754$db0fefd9@ news.zen.co.uk. ..[color=darkred]
              > >>
              > >> "Unknown User" <me@privacy.net > wrote in message
              > >> news:op.snz7vcf hr3xrds@cinza.. .
              > >> > Yet another question about vertical centering: How can I center a[/color][/color][/color]
              page[color=blue][color=green][color=darkred]
              > >> > vertically?
              > >>
              > >> http://apptools.com/examples/tableheight.php
              > >>
              > >> --
              > >> Must fly
              > >> Roy[/color]
              > >
              > > Please understand that my comments here are not an aspersion on you Mr.
              > > Reed. From what I've seen yours is the first answer other than my own
              > > with
              > > any hope of succeeding.
              > >
              > > The solution offered at apptools.com has some problems. It doesn't work[/color][/color]
              in[color=blue][color=green]
              > > IE for Mac. This isn't a problem for me since I only design for IE users
              > > on
              > > Windows but if accessibility for all is the author's goal then his
              > > solution
              > > is a failure.
              > >
              > > The DTD on the example pages is:
              > >
              > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
              > > "http://www.w3.org/TR/html4/loose.dtd">
              > >
              > > Someone correct me if I'm wrong but this isn't strict is it? If the
              > > author's
              > > goal was to avoid quirks mode and use a strict DTD then why didn't he do
              > > so
              > > in his own examples?
              > >
              > > In the first three examples there is a border around the table but not[/color][/color]
              in[color=blue][color=green]
              > > the last example, this inconsistency (oversight?) does not inspire
              > > confidence.
              > > Signed,
              > > me[/color]
              >
              > Here's an example based on the AppTools page in XHTML Strict which[/color]
              validates[color=blue]
              > and works in everything I've tested it in on PC - IE5, 5.5 and 6, FireFox,
              > Moz, NN7 and Opera 7. I don't have access to a Mac at present.
              >
              > http://www.reeddesign.co.uk/test/centered.html
              >
              > And here's a different way to do it. Also XHTML Strict. Also validates.
              >
              > http://www.reeddesign.co.uk/test/centered2.html
              >
              > --
              > Must fly
              >
              > Roy[/color]

              I have no problem taking your word that those pages validate. I myself am
              not concerned with validation. Some in this NG claim that it is unacceptable
              to do anything that is less than completely accessible to all users. Based
              on the claims made by AppTools I was supprised that the author would advise
              against using tables and instead suggest a method that fails in IE on Mac.
              Signed,
              me


              Comment

              • kchayka

                #8
                Re: Center a page vertically

                me wrote:[color=blue]
                > "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
                > news:423ff4d5$0 $8754$db0fefd9@ news.zen.co.uk. ..[color=green]
                >>
                >> http://apptools.com/examples/tableheight.php[/color]
                >
                > The solution offered at apptools.com has some problems. It doesn't work in
                > IE for Mac. This isn't a problem for me since I only design for IE users on
                > Windows but if accessibility for all is the author's goal then his solution
                > is a failure.[/color]

                You should learn what web accessiblity is and is not.

                Accessibility has nothing to do with looking the same, or even similar,
                in different browsers. The ability to center content (or not) ain't it,
                for sure.

                And FWIW, MacIE is a dying browser. I, for one, have mostly given up
                trying to cater to its eccentricities.

                --
                Reply email address is a bottomless spam bucket.
                Please reply to the group so everyone can share.

                Comment

                • me

                  #9
                  Re: Center a page vertically

                  "kchayka" <usenet@c-net.us> wrote in message
                  news:3abc3cF69l 0raU1@individua l.net...[color=blue]
                  > me wrote:[color=green]
                  > > "Roy Reed" <royreed@XXXree ddesign.co.uk> wrote in message
                  > > news:423ff4d5$0 $8754$db0fefd9@ news.zen.co.uk. ..[color=darkred]
                  > >>
                  > >> http://apptools.com/examples/tableheight.php[/color]
                  > >
                  > > The solution offered at apptools.com has some problems. It doesn't work[/color][/color]
                  in[color=blue][color=green]
                  > > IE for Mac. This isn't a problem for me since I only design for IE users[/color][/color]
                  on[color=blue][color=green]
                  > > Windows but if accessibility for all is the author's goal then his[/color][/color]
                  solution[color=blue][color=green]
                  > > is a failure.[/color]
                  >
                  > You should learn what web accessiblity is and is not.
                  >
                  > Accessibility has nothing to do with looking the same, or even similar,
                  > in different browsers. The ability to center content (or not) ain't it,
                  > for sure.[/color]

                  Maybe, it's dam hard to tell what some people in this (and .authoring.html )
                  NG want. Some seem violently opposed to IE, JS or doing anything at all that
                  might not be 100% acessible to every browser on the planet.
                  [color=blue]
                  > And FWIW, MacIE is a dying browser. I, for one, have mostly given up
                  > trying to cater to its eccentricities.[/color]

                  From that I conclude you feel certain groups are expendable, is that how you
                  define good accessibility?
                  Signed,
                  me


                  Comment

                  • kchayka

                    #10
                    Re: Center a page vertically

                    me wrote:[color=blue]
                    > "kchayka" <usenet@c-net.us> wrote in message
                    > news:3abc3cF69l 0raU1@individua l.net...
                    >[color=green]
                    >> And FWIW, MacIE is a dying browser. I, for one, have mostly given up
                    >> trying to cater to its eccentricities.[/color]
                    >
                    > From that I conclude you feel certain groups are expendable, is that how you
                    > define good accessibility?[/color]

                    Again, you are mistaking the visuals for accessibility.

                    By my comment I only meant that I no longer bend over backwards trying
                    to give comparable renderings between MacIE and other modern browsers
                    any more. It has fallen more into the Netscape 4 category and will get
                    minimally styled content if its CSS quirks can't easily be overcome.

                    This is another concept you probably have a hard time comprehending.

                    --
                    Reply email address is a bottomless spam bucket.
                    Please reply to the group so everyone can share.

                    Comment

                    • me

                      #11
                      Re: Center a page vertically

                      "kchayka" <usenet@c-net.us> wrote in message
                      news:3adkqeF68g fpcU1@individua l.net...[color=blue]
                      > me wrote:[color=green]
                      > > "kchayka" <usenet@c-net.us> wrote in message
                      > > news:3abc3cF69l 0raU1@individua l.net...
                      > >[color=darkred]
                      > >> And FWIW, MacIE is a dying browser. I, for one, have mostly given up
                      > >> trying to cater to its eccentricities.[/color]
                      > >
                      > > From that I conclude you feel certain groups are expendable, is that how[/color][/color]
                      you[color=blue][color=green]
                      > > define good accessibility?[/color]
                      >
                      > Again, you are mistaking the visuals for accessibility.
                      >
                      > By my comment I only meant that I no longer bend over backwards trying
                      > to give comparable renderings between MacIE and other modern browsers
                      > any more. It has fallen more into the Netscape 4 category and will get
                      > minimally styled content if its CSS quirks can't easily be overcome.[/color]

                      I assumed as much, I just wanted to see what you'd say.
                      [color=blue]
                      > This is another concept you probably have a hard time comprehending.[/color]

                      Undoubtedly (sigh) I guess I'll just have to muddle along.
                      Signed,
                      me


                      Comment

                      Working...