0

The website I am designing is made up of several div tags. All but one are at width of 1000 pixels. The odd one out has a width of 990 pixels. All divs are centered.

On firefox and chrome, the divs show up centered and the 990 px width div looks the same width as the 100px divs. But on IE, the 990px div shows up as exactly 990px, i.e. the other dis look longer that said div.

What's going on?

I don't know if I can post the code (work policies).

Thanks.

2
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by asuprem
0

please use html code <center> or CSS margin:auto; to centerize the divs.

0

please use html code <center> or CSS margin:auto; to centerize the divs.

All the divs are centered. Here is my problem:

1. On firefox and chrome, divs are centered, but NOT on IE
2. the div with width 990px appears the same length as the divs with width 1000px on firefox and chrome, but NOT on IE.

What can I add to my div codes to center in IE?

What is up with the differing length appearances?

0

May I know which version of IE you are using? Based on my experience, these problems exist basically cause by margin problem or the doctype.

0

I am using IE9, but most users with IE will be using version 8

1

1. declare the doctype before <html> tag: <!DOCTYPE html>.
2. add css margin:auto; to divs
Normally these should fix the problem.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.