Forums

What's wrong? It centers in firefox but not in IE? (9 posts)

  1. fredrikweb
    Member
    Posted 2 years ago #

    Hello again!

    Now I'm totally done with my wordpress website but there's one fat problem. It wont center in Internet Explorer.

    Here's the CSS

    Here's the website

    When i look on the IE I see it has to do with something about floating, because in IE everything floats to the left? But not in Firefox?

    EDIT: Now I see the About page works in IE too, that will say it also centers, weird?

  2. Peter Boosten
    Member
    Posted 2 years ago #

    There's an IE hack for that, IIRC 'text-align: center;' in 'body'

    Peter

  3. fredrikweb
    Member
    Posted 2 years ago #

    I didn't work, I add it in body tag, but nothing happened?

    Check the CSS above

  4. MAD000
    Member
    Posted 2 years ago #

    I tried the same and it did not work, here is my CSS:

    * {
    	margin: 0;
    	padding: 0;
    }
    
    body {
    	font-family: Verdana, 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	text-align: center;
    	background: url(images/bg.jpg) repeat-x #EDEDED;
    	font-size: 14px;
    	color: #000;
    }
    
    ul {
    	list-style-type: none;
    }
    
    a, a:visited {
    	text-decoration: none;
    	color: #000;
    }
    
    a:hover {
    	text-decoration: underline;
    }
    
    a img {
    	border-style: none;
    }
    
    #page {
    	width: 1020px;
    	margin: 0 auto;
    }

    I am still trying to finish up my new Theme, it looks fantastic on Fire Fox (best browser). I still have to tackle the many IE (all versions, even 8!!) issues.

    [signature moderated Please read the Forum Rules]

  5. fredrikweb
    Member
    Posted 2 years ago #

    Same here, I tested it, and internet explorer centered the website, but in firefox all the text centered, how to fix that?

  6. henkholland
    Member
    Posted 2 years ago #

    fredrik, I dont see a difference between Firefox and IE (anymore). Both center the page and text is aligned left.

  7. MAD000
    Member
    Posted 2 years ago #

    Can u explain how you resolved the issue. Which version of IE are using?

  8. fredrikweb
    Member
    Posted 2 years ago #

    yeah, I fixed it by adding a div tag named wrapper right under body in header.php and end the div tag before /body in footer.php

    and then this in the CSS code:

    #wrapper{
    width:773
    margin:0px auto

    }

    header.php

    <body>
    <div id="wrapper">

    footer.php

    </div> <!-- end wrapper -->
    </body>

  9. fredrikweb
    Member
    Posted 2 years ago #

    Also thanks to t31os_!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags