Closed Bug 265960 Opened 20 years ago Closed 20 years ago

The element "span" does not accept the css-style "width"

Categories

(Core :: Layout: Block and Inline, defect)

1.0 Branch
x86
Windows NT
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 34415

People

(Reporter: Timo.Wiese, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

The element "span" does not accept the css-style "width".

To demonstrate the problem investigate the following code:

  <div style="background-color:green;width:100px;">
    a
    <span style="background-color:red;width:50px;">
      b
    </span>
    c
  </div>

The red part should be 50px but semms to collapse to the widht ob the letter
"b". I checked out differend ways to implement the style (direct, in the head
and in a seperate file) but nothing worked.

Reproducible: Always
Steps to Reproduce:
Generate a HTML-file with a span-tag with any small content and a by css defined
width (bigger than the content width) and open it with Firefox.

Actual Results:  
The element collapsed to the content.

Expected Results:  
The element should keep the specified size.
Moving to Browser -> Layout
Assignee: firefox → nobody
Component: General → Layout: Block and Inline
Product: Firefox → Browser
QA Contact: firefox.general → core.layout.block-and-inline
Version: unspecified → 1.0 Branch
From http://www.w3.org/TR/REC-CSS2/visudet.html#Computing_widths_and_margins

"10.3.1 Inline, non-replaced elements
The 'width' property does not apply"

<span> is Inline

Bug is invalid



Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
verified invalid
Status: RESOLVED → VERIFIED
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.