How does IE7 calculate width?

On my current project, the site which I am working on must look identical in all of the newer browsers as far back as IE7 but I have a div which is absolute positioned above the rest of the content using JQuery show().

This div must fit the main centered container whose width is 980 pixels and when I give it that width it is fine in all of the other browsers. However, it is about 10 pixels shorter than it should be when viewed in IE 7 so it doesn’t quite reach all the way across.

What is the best hack for this? No conditional comments or separate stylesheets please.

cheers

Silversurfer

It’s difficult to advice w/o seeing your code. But I will take a wild guess that if you are seeing size difference in older ID, it is possible you are using a transitional Doctype ( thus giving you difficulties with the box model bug IE is so loved for)

try this as your doctype: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>

Hey thanks i will try it :slight_smile:

Internet Explorer box model bug - Wikipedia, the free encyclopedia