Closed Bug 129448 Opened 22 years ago Closed 22 years ago

CSS: width:100% should be refered to parent container

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: vicentesalvador, Assigned: attinasi)

Details

Attachments

(2 files)

Seens that width:100% property is refered to inner components and it should be
refered to 100% of width of parent container.

See the testcase below...
Attached file testcase
Width does not apply to inline non-replaced elements, so a width setting on 
SPAN is ignored (unless its display is set to something else)
 
http://www.w3.org/TR/REC-CSS2/visudet.html#q4

Same as bug 34415
Arghhhhhhhh!!!!
Sorry for the spam. M$ IE distracts me!!
But everybody knows that IE is not trylly W3C compliant

Resolving this bug as invalid
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
I've changed my testcase and the computed 100% width is not calculated
correctly. Look at the right side of the table container on my second testcase.
The inner <a> overwrites the table border.

I'm not sure if this is also my fault and this is why I not open a new bug and
show this testcase for your approvement. 
Attached file Second testcase
Verified that width doesn't work on inline boxes.

Your second testcase is also invalid.  widths don't include padding, borders, or
margins.  So your <a> takes up 100% + 2px (1px border-left, and 1px
border-right) width including padding and borders.  That's more than the space
available (100%) so it appears to overwrite the available space.  That's the
correct behavior.

Anyway, please open new bugs for different issues.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: