I am working on fairly standard layout where the "page" is centered in the window using a wrapper of 960px width (using margin:0 auto to center the wrapper).

In that wrapper, I have nested header, content, and footer divs that are set to a width of 100% (of the wrapper).

Everything works fine across all browsers until I apply a standard DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

When I do this, the nested divs (header, content, etc) take on the full width of the screen (rather than the width of the wrapper) in FF and Chrome (but still works fine in IE).

Any suggestions?

Thanks! - Trandrewo

Problem solved. In the CSS width was set to "960" instead of "960px". Once I added in the "px", everything worked. Should have had more coffee this morning...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.