Table alignment not center in IE but OK in Firefox

Discussion in 'HTML & Website Design' started by fizfaz, Jun 25, 2007.

  1. #1
    Hi,
    I need help.. I'm using NVU to create html page. The problem is the table is not centrally align when using IE browser but look fine when using firefox.

    Any idea how I can fix. I'm totally newbie in web design..:D
     
    fizfaz, Jun 25, 2007 IP
  2. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #2
    Can we see the code? Perhaps an URL to the page you're working on.
    Also, what version of IE are you testing with?
     
    Clive, Jun 26, 2007 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    Just to make a guess, since we don't have the page to look at, if you haven't used the proper DTD to trigger standards mode, IE does not support auto margins.

    cheers,

    gary
     
    kk5st, Jun 26, 2007 IP
  4. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you're going to use tables anyway, just use the <center> tag around the table. <center><table></table></center>. Couldn't be more simple. Sometimes, tables are indeed more simple than CSS and more reliable, although I like CSS much more and that is what the standards say that you should be using.
     
    Arnold9000, Jun 26, 2007 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    The center element has not been valid in any strict DTD since 1998. Do not use it.

    cheers,

    gary
     
    kk5st, Jun 26, 2007 IP
  6. Audentio

    Audentio Well-Known Member

    Messages:
    424
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Yeh, don't use the <center> tag anymore, unless you're on myspace XD
     
    Audentio, Jun 26, 2007 IP
  7. fizfaz

    fizfaz Well-Known Member

    Messages:
    334
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Hi all ,
    Thanks for all your help.. I'm sure DP forumer are very kind to help each other.. Actually after done some googling and try and error for a few times.. finally I got the way how to fix it..
    I used <div align="center"> function to make it center on IE.. The site is now live.. as in my 1st sig.. :)

    Btw, any pro and contra using this div function??
     
    fizfaz, Jun 27, 2007 IP
  8. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    gary, I'm just giving the guy a quick fix. He doesn't know css. AND, it DOES work with the loose dtd. He's using tables all over the place, so he's going to violate the strict dtd at some point anyway.
     
    Arnold9000, Jun 27, 2007 IP
  9. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #9
    The quick fix is to use a complete and proper DTD to trigger standards mode. In standards mode, auto margin works, and he already has it in place. Staying in quirks mode means at the least, IE uses the wrong box model and any elements with padding or borders will differ from modern browsers' renderings. Even worse, any use of text-align will be applied to block level descendant elements in IE, possibly causing some real x-browser layout issues.

    gary
     
    kk5st, Jun 27, 2007 IP
    luckstarr likes this.
  10. fizfaz

    fizfaz Well-Known Member

    Messages:
    334
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #10
    That's correct.. I'm do not know how to use css. That's why I using table only.. :D and WYSIWYG
    As I mentioned I'm totally newbie on web development..
    Anyway.. Thanks for try to help me.. :)
     
    fizfaz, Jun 27, 2007 IP