View Full Version : CSS layout in IE6 aligns along the far left but in FF and IE7 it looks fine.

06-07-2007, 01:38 AM
I am new to CSS, I will readily admit. I have been working in HTML for years, and am trying to give up my frames and tables habits and go to CSS. I used Dreamweaver MX to create a new CSS site, and checked it in FF and IE7, and was happy with the basic layout. Imagine my surprise when the client called to tell me it looked real funny on his older pc. :confused: He uses IE6/Windows, and it forces the entire page to the left, so alignment goes out the window.

I would appreciate either an answer as to why and how to fix, or just how to fix, or anything in between. I have determined, through playing around, if I pad the left margin to 145 pixels, in any browser size 1024x768 or smaller, it spaces correctly, but it makes a scroll bar along the bottom. Not a good fix, IMO. :mad:

Anyway, the site is at http://www.haulstartrailers.com , and the problem seems to follow through all pages the same.

Thanks for anything you can offer. :thumbsup:


06-07-2007, 02:28 AM
Get rid of this

<?xml version="1.0" encoding="utf-8"?>
Its putting IE6 intro quirks mode causing margin:auto; not to work.

You're welcome.

06-07-2007, 02:41 AM
I cannot adequately pass along my thanks. Seriously. I knew it would be a small and obvious problem, but I am amazed at what caused it. Out of curiosity, is it the code, or the location that caused the issue?

I owe you lunch, lemme know when!!


06-07-2007, 03:07 AM
Its the code and kind of the location. For the document to be proper it needs to be at the top before the doctype however anything above the doctype in IE6 will put the document into quirks mode. You could move the xml declaration but its not really necessary.