Closed Bug 34415 (SpanWidth) Opened 25 years ago Closed 25 years ago

CSS width property does not apply to inline elements (e.g., span)

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

VERIFIED INVALID

People

(Reporter: keith.lesch, Assigned: pierre)

References

Details

Attachments

(1 file)

For instance we will look at a SPAN within a DIV. The DIV is set to 100% width and the span is set to 50%. The SPAN now falls into spec 10.3.3 of CSS Level 2, as a block-level non-replaced element in the normal flow. This specifies that these elements should be able to have their width defined, among other things. Those "other things" such as paddingRight, marginLeft, etc. appear to work. However width must have been overlooked. There is an attachment coming to show this.
By default, SPAN is an inline element. If you want to make it a block-level element, you must give it 'display: block'. The test page is laid out correctly. The width property does not apply to inline non-replaced elements (CSS2 10.3.1). Marking invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Verifying bug invalid.
Status: RESOLVED → VERIFIED
*** Bug 273878 has been marked as a duplicate of this bug. ***
*** Bug 279118 has been marked as a duplicate of this bug. ***
*** Bug 278723 has been marked as a duplicate of this bug. ***
*** Bug 274740 has been marked as a duplicate of this bug. ***
*** Bug 265960 has been marked as a duplicate of this bug. ***
*** Bug 260060 has been marked as a duplicate of this bug. ***
*** Bug 249831 has been marked as a duplicate of this bug. ***
*** Bug 217155 has been marked as a duplicate of this bug. ***
*** Bug 215996 has been marked as a duplicate of this bug. ***
*** Bug 194484 has been marked as a duplicate of this bug. ***
*** Bug 178119 has been marked as a duplicate of this bug. ***
*** Bug 177843 has been marked as a duplicate of this bug. ***
*** Bug 177765 has been marked as a duplicate of this bug. ***
*** Bug 151539 has been marked as a duplicate of this bug. ***
*** Bug 52312 has been marked as a duplicate of this bug. ***
*** Bug 51850 has been marked as a duplicate of this bug. ***
*** Bug 281313 has been marked as a duplicate of this bug. ***
Alias: SpanWidth
OS: Windows NT → All
Hardware: PC → All
Summary: [BLOCK] SPAN does not resize with width:x or x% → CSS width property does not apply to inline elements (e.g., span)
*** Bug 281313 has been marked as a duplicate of this bug. ***
*** Bug 294477 has been marked as a duplicate of this bug. ***
*** Bug 299705 has been marked as a duplicate of this bug. ***
*** Bug 50626 has been marked as a duplicate of this bug. ***
*** Bug 298178 has been marked as a duplicate of this bug. ***
*** Bug 324544 has been marked as a duplicate of this bug. ***
*** Bug 329920 has been marked as a duplicate of this bug. ***
using display:block does cause an unwanted line break I can't shake off, and float isn't going to do the job in every instance and neither is inline-block. what I need is span with a width.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: