Closed Bug 237544 Opened 22 years ago Closed 22 years ago

style width 100% should be greedy

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mozilla, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 When width: 100% style is used, it should be greedy and expand surrounding boxes to take all free space. Reproducible: Always Steps to Reproduce: Plase view the test html file, included in the attachment Actual Results: Input box will take only 50% of browser window width (body width actually). Easily seen when browser maximized. Expected Results: Input box should take all space from end of left cell to right edge _greedily_ (that is, left cell should be forced as small as possible--or in the general case, all other cells should be forced as small as possible, and all cells with widht=100% should devide the remaining space). Expected result (this is also the workaround) can be seen if style="width: 100%;" is affef to the right cell.
Attached file Test case
> When width: 100% style is used, it should be greedy and expand surrounding > boxes to take all free space. Why? Is there a basis for this claim? That's not the way width computation works in CSS...
You have a valid point, my expectation may be incorrect. Nesting two tables inside each other and having the inner with width of 100% does not expand the outer to 100%. On the other hand, this is slightly different, the table is already expanded to 100%. If we define that table columns should follow "required size", based on width of inner contents for width computation (think of the way html table column widths are computed in general if we were to have text in them), then the left column has a fixed required size, and the right one has unlimited (both up and down) required size. Thus, the expectation is the right column will expand to take all space not required by the left column. In my opinion, this would be the expectation of the average developer. Note that addinng width=100% to the <td> follows this logic (not completely the same layout case, agree). Anyway, there is a workaround to set the TD element to 100%, maybe this is a non-issue.
The "workaround" is to use the * widths on the columns. The only negative side effect is that it doesnt work in IE. I believe this bug is invalid. Bugzilla is not the right place for this. This is a question of the specification and not implementation. This should go to www-style (http://lists.w3.org/Archives/Public/www-style/) and then into the CSS3 Table. I would however expect strong opposition, but you could try it.
Agreed. Should close this bug then (not sure if I can close it, or I would).
Marking INVALID per comment 4. At least, for now. If the WG decides the behavior described in comment 0 is the correct behavior, this bug can be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: