Closed Bug 13414 Opened 21 years ago Closed 21 years ago

box with border-width not positioned right


(Core :: Layout, defect, P3)

Windows 98





(Reporter: koichi, Assigned: don)



(2 files)

I tested this on M9.

If I create multiple boxes with of same size (that is, having the same left,
top, width and height values) with different border width, the box with larger
border-width is shifted to the right.

Suppose I have a box like:
.box{position:absolute; left:100px; top:100px; width:200px; height:150px;}
and border-width of 20px.

It seems that Mozilla expands border width outward to 20px, and then make the
outer-side of top-left corner of border to be the starting point (100px, 100px).

I have attached two HTML files to show this visually.

Since I couldn't find an information at the W3C about how it should be handled,
I don't know if it's right or wrong.  But shifting the box to the right doesn't
seem right.

But my biggest problems is that it handles differently than IE5.  In IE5, it
expands border inward and thus the size of the box does not change.

I'm not saying that IE is doing the right way, but it would be nice if both
browsers handled the same way so I can write one code for both browsers.

But if Mozilla's way is the CSS1 specified way and MS is doing the wrong way,
then I should be asking to MS to fix it.
Closed: 21 years ago
Component: Browser-General → Layout
Resolution: --- → INVALID
Mozilla is right.  See:

For absolute positioning, note the erratum for 9.3.2 in

This is a known bug in IE, although I didn't notice how it was done with
absolute positioning.

Changing component to Layout and marking INVALID.
Resetting QA contact from leger.
Agreed. Marking as verified invalid.
You need to log in before you can comment on or make changes to this bug.