Closed
Bug 59007
Opened 25 years ago
Closed 21 years ago
width in css doesn't work
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: morten, Assigned: pierre)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.4.0-test6 i686; Nav)
BuildID: 20001102
the "width" attribute in CSS2 doesn't work, it works in IE - try comparing
http://blah.wtf.dk/ in IE and Mozilla.
Reproducible: Always
Steps to Reproduce:
1.
Make a stylesheet:
<style> A.bah { width: 150px; background-color: black; } </style>
make a link with the stylesheet
<a class="bah" href="bah.htm">bah</a>
2.
Try it out in your browser
You'll notice that the width attribute is totally ignored, the width of the link
will be the width of the text, not the one defined by width.. try it in IE eg.
Actual Results: The width attribute is ignored.
Expected Results: Mozilla should have made the link the width I specified, not
the width of the text.
Comment 1•25 years ago
|
||
I think this is INVALID: per the CSS2 spec -
"width: This property does not apply to non-replaced inline-level elements. The
width of a non-replaced inline element's boxes is that of the rendered content
within them"
Anchors start off being inlined. If you force it to display: block via the style
sheet it renders as you expected. Applying the style to the TD is probably
better though.
| Assignee | ||
Comment 2•25 years ago
|
||
Richard is correct. You can't set the width on inline elements.
Closed as invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Updated•21 years ago
|
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Comment 4•21 years ago
|
||
*** This bug has been marked as a duplicate of 50626 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago → 21 years ago
Resolution: --- → DUPLICATE
Updated•21 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•