MyBB Community Forums

Full Version: Text is displaying "centered" while viewing with IE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Content (text) of forum is displaying "centered" when using the dreaded IE6, but displaying "left" or correctly when using FireFox. Any ideas on making it display correctly while using IE? I am using V1.2.3 of myBB.
Hello there

in Admin CP > Themes > Modify / Delete > Edit

Find Page Container under Extra CSS Attributes add

text-align: left; /* IE 5 fix */
text-align: left; /* IE 5 fix */

is already in page container under Extra CSS Attributes.

I have added several plugins, that are working correctly, don't think those would be the cause.
Maybe you need a "</center>" tag somewhere? It's happened to me with my forum. FF would display fine and IE wouldn't.
gimmezell Wrote:Maybe you need a "</center>" tag somewhere? It's happened to me with my forum. FF would display fine and IE wouldn't.


I am glad you suggested that. I reverted back to my original "header", after having a banner ad "centered" in my header area. After reverting back to "original", it all aligned "left" again in IE6. I don't know why it worked OK in FF, but not in IE? It was a "flash" banner if that has anything to do with it. I did use the <center> and </center> tags on the banners html code too by the way. Bummer, because I still would like to use that banner...
Please provide us with a link to your forums.
Quote:I did use the <center> and </center> tags on the banners html code too by the way
Most likely, you forgot the </center> tag to close it.  The reason it was ok in Firefox is because Firefox ignores the <center> tag after a DIV ends.  IE, for some reason, continues to render the page centered regardless of any other containers (like DIVs, SPANs, etc).

Give it a try.  Paste this into notepad and save it as test.html

<div>
blah blah blah blah
<center>
THIS TEXT SHOULD BE CENTERED
</div>

<br />
<br />

<div>
THIS TEXT SHOULD NOT BE CENTERED
</div>

You can even make that 2nd div <div style="align:left;"> and it won't make a difference in IE.

Now, open test.html with IE and then with Firefox.  You'll see the difference and that's why your page messed up in IE but not in Firefox.
You shouldn't use the <center> tag....you can just add <div align="center"> instead... Cleaner imho
I guess he was refering to all the text not only a part of it.. so it will be little not undue to search every where and put <div align="left"></div>. Plus guys he doesn't want to center them he wants them to the left.
I've got this problem as well and can't fix it.

JUST fixed it.

copy and paste: text-align: left; /* IE 5 fix */
in to Content Container (Customized in this style). Smile