If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

border is ignored from height in div element

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Mateus Queiroz Correia, Assigned: dbaron)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803

When we set the border pixel, style and color from a div element the height of 
this div ignore this border for you offsetheight. The same style applied in a 
table have a correct behavior

Reproducible: Always
Steps to Reproduce:
1.Open page http://www.sengir.hpg.ig.com.br/DivError.htm
2.Look at 2 first shapes in the html, they are the divs with the problem
3.

Actual Results:  
The <div> element with the border will have a size bigger than the defined 
height

Expected Results:  
The <div> element must have the size defined in the height
This is invalid.  "height" does not include the border and padding in CSS.

For tables, Mozilla uses "-moz-box-sizing: border-box" for backwards-compat reasons.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

13 years ago
But how I make the Div have the same behavior that the Table? I think that all 
mozilla and stylesheet must have the same behavior for all elements. See the 
url http://www.sengir.hpg.ig.com.br/DivError.htm, the same stylesheet is 
applied for a DIV and a TABLE and the layout is different.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(Reporter)

Comment 3

13 years ago
Thanks for the hint of apply "-moz-box-sizing:border-box;". I reopened the bug 
just for question if different behavior is a good think.

Thank again
Yes.  The behavior is VERY intentional.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.