1

I have created a free report and it is working too fine in mozilla firefox but having alot of issues in MS IE.

Please give me any solution for this please.

Here is the link of the website which is looking messed up in IE.

http://www.getsuperiorreturnsnow.com/

i set its main #container

#container {
   width: 840px;
   margin: 10px auto;
   display: block;
}

but not working. :(

Muzammil
  • 508
  • 2
  • 11
  • 21

2 Answers2

2

IE is displaying your page in Quirksmode which is why margin: auto will not work.

You can check if IE is running in Quirksmode by reading the answer on this post: How to tell if a browser is in "quirks" mode?

You'll find a list of IE Quirksmode limitations here: http://www.quirksmode.org/css/quirksmode.html

You will need to change your Doctype to make IE run in strict mode. For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Community
  • 1
  • 1
T. Junghans
  • 11,385
  • 7
  • 52
  • 75
  • really helpfull, but having some more error in the like ,, heading is showing under the book, but it should show left side. – Muzammil Feb 16 '12 at 12:14
  • I'm not quite sure why but I'm guessing this is also a cause of quirks mode. Somehow the floats aren't performing right. Also see http://stackoverflow.com/questions/1443007/cannot-get-float-left-right-to-work-for-a-div-in-internet-explorer. Giving div.book-preview a width of 230px will correct this, however I strongly suggest you update your doctype. – T. Junghans Feb 16 '12 at 12:30
  • i update the doc type to locally, but not on server. – Muzammil Feb 16 '12 at 12:35
  • @Muzammil Best choice of doctype :-) – T. Junghans Feb 16 '12 at 12:39
  • i have 1 more question, as we have firebug for mozilla, is there any tool for IE same as firebug? – Muzammil Feb 16 '12 at 12:40
  • There's the IE developer toolbar. http://www.microsoft.com/download/en/details.aspx?id=18359 It's not as powerful as firebug, but it does help quite a bit. – T. Junghans Feb 16 '12 at 12:45
0

For IE6 you're going to want to add text-align: center; to the element parent to the container which you are using margin: auto;

For example if you had:

<body>
<div id="wrap">

You could try:

body {text-align: center;}
#wrap {width: 1000px; margin: auto;}
harry
  • 731
  • 10
  • 23