table content computed differently than div content.

RESOLVED FIXED in Future

Status

()

Core
Layout
P3
minor
RESOLVED FIXED
16 years ago
11 years ago

People

(Reporter: Sean Proctor, Assigned: Marc Attinasi)

Tracking

({testcase})

Trunk
Future
testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

16 years ago
tables has set:
border-style: none;
padding: 0;
margin: 0;
width: 100%;
div has set:
nothing that should affect this

sometimes the table and div line up (ie have the save width), sometimes they
don't.  (if I up'ed my resolution they lined up fine.)  I'm guessing there's a
floating point involved here someplace that is behaving differently between the
two (this is the only thing I can think of besides my code being invalid, but
I'm pretty sure my code is right).

Comment 1

16 years ago
Changing QA contact
QA Contact: petersen → amar
Is this the table with the months?  Or the table of days?
(Reporter)

Comment 3

16 years ago
both, but the first page lines up well, I've updated the URL to
http://php-calendar.sourceforge.net/php-calendar/display.php

the two tables on that page (no border, padding, margin) are wider than the div
(by 1 or 2 pixels), but if I up the resolution, they're the same width (the
reason I don't think it's a problem in my CSS).
Try making the borders on both table and div much bigger (eg 20 px, not 1px or
2px).  Does that make things even worse?  Conversely, does changing the border
to 0px make things better?
(Reporter)

Comment 5

16 years ago
increasing the border size doesn't make this any more apparent.  I would've
thought it would change things.  (there was no border originally, and setting
border-spacing: 0 doesn't get rid of the problem.)  perhaps tables are rendered
differently than divs, but I thought having a border, etc with width: 100% would
cause the content to be the width of the containing block, not the entire table
to be the width of the containing block.  I've left the borders at 20px if you'd
like to see.  also setting the borders to 0px does not remove the issue.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase

Comment 6

16 years ago
Created attachment 74181 [details]
two boxes, a DIV and a TABLE, should be equal width

shows just the bug.
the bug is in rendering the following:
body { padding: 0, 2%; }

Comment 7

16 years ago
also seeing bug on win2k build 2002031104 and linux build 2002031121
please change OS from Windows NT to All, I don't have permission.
OS: Windows NT → All
Hardware: PC → All

Updated

16 years ago
Priority: -- → P3
Target Milestone: --- → Future
(Reporter)

Comment 8

16 years ago
I've tried to look into fixing this a little, but I don't really know where to
start.  I was looking through layout.  Any tips you can give?
See how TableOuterFrame (the table) and AreaFrame/BlockFrame (the div) size
differently?

Updated

15 years ago
Blocks: 134942
bernd, could this be due to the rounding table layout does?

Comment 11

11 years ago
Testcase wfm.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20061231 Minefield/3.0a2pre
I see the bug in a 2006-12-07-01 build but not a 2006-12-08-01 build.  Fixed by reflow branch landing, looks like.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Depends on: 300030
Resolution: --- → FIXED
Does this need a reftest?
Yes.
Flags: in-testsuite?
Created attachment 257329 [details] [diff] [review]
Reftests
Attachment #257329 - Flags: review?(bzbarsky)
Comment on attachment 257329 [details] [diff] [review]
Reftests

You probably need an explicit "-moz-box-sizing: border-box; box-sizing: border-box" on the table to make this future-proof...
Attachment #257329 - Flags: review?(bzbarsky) → review-
Created attachment 257389 [details] [diff] [review]
Added border-box to table
Attachment #257329 - Attachment is obsolete: true
Attachment #257389 - Flags: review?(bzbarsky)
Attachment #257389 - Flags: review?(bzbarsky) → review+
Checked in the test.  Thanks!
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.