PDA

View Full Version : Resolved Page Randomly Becomes Aligned to Left in IE7



Armondo
Jan 18th, 2009, 04:39 AM
Here is the test page I am working with: http://whappodcast.com/untitled2.html

In firefox it is centered like it is supposed to and how the code tells it to...but in IE it is aligned to the left. It does this 6/7 times you reload the page. It's very strange.

I took the time to make this validate as XHTML STRICT and it still doesn't work correctly. I can't see what i am doing wrong!

The page and the code is available here: http://whappodcast.com/untitled2.html

The CSS is not in a stylesheet because it is unique to this page

EDIT: Aha! Found it! on line 173

...
<div id="rubrub">
<div style="width:200px; float:left;" id="balls">
<div class="home1">
<a href="/" class="home2">Home</a>
....

ok so it's that float that is throwing it off....hmm how do I fix that without removing that float?

Majoracle
Jan 18th, 2009, 05:16 AM
Looked fine to me in both FF and IE7. but, if you're getting the problem still, try this:


#wrapper {
/*min-height:100%;*/
margin:0 auto;
width:750px;
}

It will center your #wrapper div, allowing you to float within it freely.

Armondo
Jan 18th, 2009, 05:43 AM
Hmmm....man this is what happens every time I get to a certain point in a project. I just want to erase it and start over lol.

Ok, so now I have to implement this sitewide...

my question is why does this center: http://whappodcast.com/testing.php

and this doesn't: http://whappodcast.com/untitled3.html

this is really strange....

Arbitrator
Jan 18th, 2009, 09:07 AM
my question is why does this center: http://whappodcast.com/testing.php

and this doesn't: http://whappodcast.com/untitled3.htmlI would hazard a guess that the problem is due to the SGML comment at the beginning of your untitled3.html document’s source code; such comments appearing before a document type declaration trigger quirks mode in WIE7.

Armondo
Jan 19th, 2009, 12:22 AM
Yep, you were right. I got rid of my cocky little "If you are reading this" comment at the top and haha it works perfectly now. Man, and to think I spent all that time validating it and removing features for the some purpose of debugging...it was that stupid little comment. It that irony, or a poetic coincidence?

Anyway, It's all fixed now. Thanks to everybody for their help!