bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

<br> in tables or blocks with display:table is calculated as 1px in the container width

RESOLVED FIXED

Status

()

Core
Layout: Block and Inline
RESOLVED FIXED
14 years ago
9 months ago

People

(Reporter: pascalc, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME)

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
Mozilla 1.8a4 windows XP

1 put an image and a <br> in a table cell or a div with display:table
2 put a redbackground color on the container

expected result : total width is the width of the image
actual result : total width is the image width + 1px, you see the red background
color on the right side

This is very annoying on all the sites using tables for layout of their images

testcase coming
(Reporter)

Comment 1

14 years ago
Created attachment 162180 [details]
testcase showsing the width bug

This testcase shows how width is miscalculated. The Image is 80px wide and the
container should therefore be 80px wide as well.

Dom inspector shows that it is in fact 81px wide

Note that Dom Inspector also shows that the br element is 0.06667px wide, I
don't know why <br> should have a width, perhaps because it is required by the
engine to be able to parse it, but 80+0.06 should not be rounded to 81 :)
(Reporter)

Updated

14 years ago
Keywords: testcase
Not a tables bug.  Over to inline layout, but I was sure we had a bug on this
already....
Component: Layout: Tables → Layout: Block and Inline
OS: Windows XP → All
QA Contact: core.layout.tables → core.layout.block-and-inline
Hardware: PC → All
Whiteboard: DUPEME

Comment 4

14 years ago
Created attachment 166290 [details]
1px bug caused by 'select' tag

This is another testcase which shows the 1px width bug.  The use of a <select>
tag causes all subsequent paragraphs to be missing from the <div>.
(Reporter)

Comment 5

9 months ago
The bug is gone, the div in the testcase now has a 80.017px width that is 80px for the div + 0.017px for the <br> tag, no more rounding up.
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.