Closed Bug 177843 Opened 23 years ago Closed 20 years ago

heigth and width attributes of style for span ignored.

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 34415

People

(Reporter: Rob.Jones, Assigned: dbaron)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 The height and width of styles inside &lt;span&gt; are being ingnored. Tested with mozila 1.0, 1.1, and 1.2beta In the sample below I would expect to see blue,red, and green squares 200 pixels wide and in the case of the red square 200 pixels high. I only see this for the divs and not the spans. BTW (although probably irrelevant IE displays my expected behaviour.) Sample HTML file To test --------START FILE <html> <head> <title>Div Span Css Test</title> </head> <body> <p>Some Ordinary text & background</p> <p>Test 1 - spans</p> <span style=" background: blue; width: 200px "> some text </span> <span style=" background: red; width: 200px; height: 100px"> some text </span> <span style=" background: green; width: 200px"> some text </span> <BR> <p>Test 2 - spans with &lt;BR&gt;</p> <br><span style=" background: blue; width: 200px"> some text </span> <br> <span style=" background: red; width: 200px; height: 100px"> some text </span> <br><span style=" background: green; width: 200px"> some text </span> <BR> <p>Test 3 - divs</p> <div style=" background: blue; width: 200px"> some text </div> <div style=" background: red; width: 200px; height: 100px"> some text </div> <div style=" background: green; width: 200px"> some text </div> <P> Test 1 should appear the same as test 2. <BR> As the divs in test 2 are not seperated by &lt;BR&gt; <BR> <BR>Comparing Elemenets <p>a &lt;Div&gt; 10 px wide <p> <div style=" width 10px " > some text here </div> <p>Verses behaviour for other elements <p>a &lt;p&gt; 10px width <p style=" width: 10px"> this text wraps </p> </body> </html> --------END FILE Reproducible: Always Steps to Reproduce: 1. Save my sample text file somewhere 2. open it with mozilla. 3. Actual Results: Mozilla displays the spans as though no height or width had been specified.
Height and width do not apply to non-replaced inline-level elements, per the CSS2 spec.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Verified. See also bug 169138 comment 2.
Status: RESOLVED → VERIFIED
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.