Version: (using KDE KDE 3.3.2) Installed from: Gentoo Packages OS: Linux div style margin not rendered properly. see the attached file that shows the problem. code works fine with ie and opera. firefox 1.0 has the same problem as konqueror.
Created attachment 9360 [details] testcase for the rendering bug
How is this supposed to render? The only thing that appears not to be rendered correctly is the 10px right margin.
the right-margin, that is ignored for some reason, is exactly the problem that i meant. i you look at the rendered page i expect that same 10 pixel border on the right side, that i can see on the left side. sorry if that was not clear from my initial report.
The problem is that your width:100% makes the div as wide as the page (+ the div's borders!), and that the subsequent margins get screwed up because of that. As a workaround, don't set the width. It'll be 100% if not set. But I agree that there is something wrong with the way Konqueror calculates this.
oh, our rendering is perfectly standard compliant here, as is Mozilla's. The difference is MSIE-like engines substract the margins from the calculated percentage width in quirk mode. I think we should match that.
Created attachment 9796 [details] proposed patch, please review.
Couldn't this be implemented by adding a -khtml-margin-box value to box-sizing?
I think that would bring some semantics problems for vertical margins, because those collapse with complicated rules - so what would it apply? specified or effective margins? e.g. IE only does that horizontally. But I see where you are heading... not sure that quirk makes much sense in content-box model context indeed ;(
opera backed off on this one too so this pretty much settles the matter.