views:

34

answers:

2

Title says it all. Trying to get information on this so I can answer my other question here.

+1  A: 

It takes the width of the parent element and sets the width of the current element to 100% of it.

What you may have run into, however, is the IE box model bug (which is still present in 'Quirks Mode').

Specifically, when in quirks mode, IE includes padding within the area defined by 'width', while the W3C box model does not - both padding and margin are added onto the width.

Amber
Ok, so if the parent element is the body tag, shouldn't a div tag with 100% width contained in the body tag be 100% of the page? Also, I am using IE8 and XHTML strict, so I unless my document has errors I do not see, I don't think the box model bug is the problem.
typoknig
Theoretically, yes.
Amber
After trying many different combination I found one that worked. Using compatibility mode in IE8 was the final thing that made it work, but I must have changed something else in the process because I tried compatibility mode many times in the past 24 hours and it didn't work. Any way, at least I know what the problem is, now I just need to find out how to force a page to load in compatibility mode. One more thing, @Amber, are you considering `Quirks Mode` and `Compatibility Mode` the same thing???
typoknig
+1  A: 

You can refer to THIS page for more detailed information.

o15a3d4l11s2