SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    table wont behave in IE

    Hi,

    could anyone tell me why in IE6 my table just wont play ball. Im not too hot on tables but i cant see why it wont sentre in the div like it does in FF.....ive played for hours and cant find it!.......this is a site im adding some pages to so please excuse code, all the styles ive added are at the bottom of the style sheet.

    http://jonny.cctraffic.co.uk/celltemp/ea2.htm

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your doctype is missing.

    Please fix your X/HTML and (non-pseudo-class related) CSS errors.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    You can use margin:auto to center your table but as Kravvitz already pointed out your doctype is missing which will throw IE6 into quirks mode.

    In quirks mode IE6 doesn't understand margin:auto and will not center elements that way. It only centres elements when text-align:center is applied to a parent element just the same way that ie5.+ does.

    Add the doctype and the margin:auto will work to centre in IE6

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great thanks for that guys, sheer carelessness on my part for not spotting that.......but as i say this was someone elses code that im adjusting

    Thanks very much! have a good w/e!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •