Centering an Image in IE7

I've defined a class in my style sheet as below:

    display: block;
    margin-right: auto;
    margin-left: auto;

And then I assign the class to certain <img> tags:

        <img src="images/Performance.jpg" class=fig />  

For FireFox this centers the image fine, but it seems to have no effect in IE7. The image remains left-justified.  What more is needed for IE7?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David S.Commented:
It sounds like IE is in quirks mode. Make sure you use a doctype that triggers "standards mode".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stevaAuthor Commented:
Thanks. My doctype was there but had an extra <! in front of it::

<!<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"

IE couldn't find a valid DTD then so reverted to quirk mode.  Removing the <! got the image to center in IE7.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.