Bug 98214 - div style margin not rendered properly
Summary: div style margin not rendered properly
Status: RESOLVED INTENTIONAL
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-30 18:29 UTC by andreaswuest
Modified: 2009-11-08 05:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase for the rendering bug (368 bytes, text/html)
2005-01-30 18:30 UTC, andreaswuest
Details
proposed patch, please review. (795 bytes, patch)
2005-02-23 14:59 UTC, Germain Garand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreaswuest 2005-01-30 18:29:10 UTC
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.
Comment 1 andreaswuest 2005-01-30 18:30:06 UTC
Created attachment 9360 [details]
testcase for the rendering bug
Comment 2 Thiago Macieira 2005-01-30 19:37:03 UTC
How is this supposed to render?

The only thing that appears not to be rendered correctly is the 10px right margin.
Comment 3 andreaswuest 2005-01-30 19:50:57 UTC
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.
Comment 4 Niels 2005-01-30 20:47:33 UTC
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.
Comment 5 Germain Garand 2005-02-23 14:56:44 UTC
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.
Comment 6 Germain Garand 2005-02-23 14:59:44 UTC
Created attachment 9796 [details]
proposed patch, please review.
Comment 7 Allan Sandfeld 2005-02-23 15:02:26 UTC
Couldn't this be implemented by adding a -khtml-margin-box value to box-sizing?
Comment 8 Germain Garand 2005-02-23 16:13:11 UTC
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 ;(
Comment 9 Germain Garand 2009-11-08 05:53:26 UTC
opera backed off on this one too so this pretty much settles the matter.