Re: Can't get it centered...

Discussion in 'HTML' started by Steve Pugh, Jun 3, 2008.

  1. Steve Pugh

    Steve Pugh Guest

    On Jun 3, 5:44 pm, "Art" <> wrote:
    > Just started working with a template, and it's centered in Firefox, but now
    > IE doesn't center it.  (It should be centered.)
    >
    > I can't figure out what the problem is; don't use CSS all that much and I
    > didn't write the template.  Can anyone see what I'm missing here?
    >
    > Thanks in advance.
    >
    > http://accursos.com


    Look at the first line of your source code:
    1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
    TR/xhtml11/DTD/xhtml11.dtd">

    That '1' before the doctype causes IE to go into quirks mode. As such
    it doesn't apply CSS according to the standards, including not
    supporting margin: auto;

    Remove the '1' and it will be centered.

    Whilst your editing that line change the doctype to something more
    useful than XHTML1.1 for all the reasons repeated many times in this
    group's archives.

    Steve
    Steve Pugh, Jun 3, 2008
    #1
    1. Advertising

  2. Steve Pugh wrote:

    > Whilst your editing that line change the doctype to something more
    > useful than XHTML1.1 for all the reasons repeated many times in this
    > group's archives.


    Oh yeah. I missed that. Art, see this page, and the test pages.

    http://tekrider.net/html/doctype.php

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jun 4, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Wade

    Controls Always Centered

    Ryan Wade, Oct 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    348
    Steve C. Orr [MVP, MCSD]
    Oct 4, 2004
  2. Nico
    Replies:
    0
    Views:
    446
  3. mark4asp
    Replies:
    4
    Views:
    511
    Ben C
    Feb 18, 2008
  4. Beauregard T. Shagnasty

    Re: Can't get it centered...

    Beauregard T. Shagnasty, Jun 3, 2008, in forum: HTML
    Replies:
    0
    Views:
    355
    Beauregard T. Shagnasty
    Jun 3, 2008
  5. dorayme

    Re: Can't get it centered...

    dorayme, Jun 4, 2008, in forum: HTML
    Replies:
    1
    Views:
    358
    Beauregard T. Shagnasty
    Jun 4, 2008
Loading...

Share This Page