1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Centering IE Issue - Help Please

Discussion in 'CSS' started by TwisterMc, May 2, 2005.

  1. #1
    Can you believe it, another CSS IE issue. ;)

    My site, TwisterMc, is centered and looks wonderful everywhere except in IE on a PC. Oddly enough though, my blog is centered in IE on a PC and they use the same layout and CSS file.

    Anyone know a fix for my site? The only think I can figure is the doc tag, but if I change the doc tag on my site it won't validate and I like it validating.

    Ideas please.
     
    TwisterMc, May 2, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When I add a text-align:center; to your body, it appears centered in IE & Firefox BTW, the w3 css validator gave you one warning :)
    BODY {
    	FONT: 12px "trebuchet MS", Verdana, Sans-Serif; COLOR: #000000; text-align:center;
    }
    Code (markup):
     
    exam, May 2, 2005 IP
  3. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ohh i'm so gonna try that. Thanks. :)
     
    TwisterMc, May 2, 2005 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem :)
     
    exam, May 2, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It is better not to use text-align for this purpuse because it is inheritable and all other elements within body will be center-aligned as well. Fixing them all isn't a simple task. See the thread 7061 on how to ceneter block elements in IE.

    J.D.
     
    J.D., May 2, 2005 IP
  6. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    TwisterMc, May 3, 2005 IP
  7. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Looks good (everything's centered)
     
    J.D., May 3, 2005 IP
  8. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Which option did you look at or both? And what is centered, just the site right, not all the text too?
     
    TwisterMc, May 3, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Both are properly centered in IE. The right column on the contact page seems to be shifted a bit to the right compared with the other page.
     
    J.D., May 3, 2005 IP
  10. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Now I just have to implement one site wide.
     
    TwisterMc, May 3, 2005 IP