Results 1 to 7 of 7

Thread: In FF it is centered; in IE it's lef-justified

  1. #1
    Wow. Life is short. Erin's Avatar
    Join Date
    Mar 2006
    Posts
    173

    Question In FF it is centered; in IE it's left-justified

    I use IE so rarely that I didn't even notice that my blog is messed up in IE:

    http://www.erinbilly.com/

    In Firefox, it shows up centered, the way I expected.

    Is it just me? I swear, the last time I checked it in IE, it was okay. I haven't really added much to the site...
    Last edited by Erin; 04-16-2006 at 05:05 PM. Reason: Typo.

  2. #2
    Senior Member agua's Avatar
    Join Date
    Sep 2005
    Location
    Pottsville, NSW
    Posts
    531
    Try text align: center in your body tag:
    Code:
    body {
    	font-size: 62.5%; /* Resets 1em to 10px */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	background-color: white;
    	color: #2A4010;
    	text-align: center;
    	line-height: 1.7em;
    	margin: 0;
    	padding: 0;
    }
    You may have to alter your text to align left in your content style sheet.

    PS - not tested so I could be wrong
    I Do Website Design - but I am here to learn all about publishing

  3. #3
    Working. Masetek's Avatar
    Join Date
    Aug 2005
    Location
    Aust
    Posts
    543
    Yeah that works:

    In FF: margin: 0px auto;
    In IE: body{text-align: center;}

    Make sure you set you inner divs to text-align: left because in IE they will inherit the center attribute from the body tag


  4. #4
    Wow. Life is short. Erin's Avatar
    Join Date
    Mar 2006
    Posts
    173
    Wow, I spaced on this post. I don't know what was happening then, but it's working now.

    Thanks to both of you for your help, and I apologize for the delay in responding.

  5. #5
    Registered
    Join Date
    Apr 2006
    Posts
    184
    You don't need to do

    body { text-align:center; }

    in IE. Margin works just fine, but you have to specify it for all four margins, not just use the left/right, top/bottom pairs like you can in IE So...

    margin:0 auto 0 auto;

  6. #6
    Is Still Alive! Johnny Gulag's Avatar
    Join Date
    Feb 2006
    Location
    North Texas
    Posts
    242
    Quote Originally Posted by KelliShaver
    You don't need to do

    body { text-align:center; }

    in IE. Margin works just fine, but you have to specify it for all four margins, not just use the left/right, top/bottom pairs like you can in IE So...

    margin:0 auto 0 auto;
    This is a hack for IE5 I think to make the site center.

  7. #7

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
  •