Closed
Bug 274740
Opened 20 years ago
Closed 20 years ago
Setting width and height on SPAN tag doesn't work
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: eric.van.hinte, Assigned: bugzilla)
Details
To show a background image at its full size, I'm applying a width and height on a SPAN tag. This construct works for a DIV tag (see also bug 266523) but does not for a SPAN tag. In IE6, both constructs work. NOTE: The image "some_bg_image.jpg" needs to be bigger than the foreground text "labeltext". Example code : <html> <body> <h2>Using a SPAN tag </h2> <span style="background-image: url(some_bg_image.jpg); width:89px;height:56px;" >labeltext</span> <h2>Using a DIV tag </h2> <div style="background-image: url(some_bg_image.jpg); width:89px;height:56px;" >labeltext <br> </div> </body> </html>
Comment 1•20 years ago
|
||
SPAN is an inline-level element. So it is not possible to assign it a width or height (without changing the element to an inline-block-level or block-level element). Marking Invalid. Please see http://www.w3.org/TR/REC-CSS2/visudet.html#q4 and http://www.hwg.org/resources/faqs/2cssFAQ.html for this.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Comment 2•20 years ago
|
||
Oh, and over to the style system.
Component: General → Style System (CSS)
Product: Firefox → Core
Version: 1.0 Branch → Trunk
Updated•20 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 3•20 years ago
|
||
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•