Closed
Bug 329920
Opened 19 years ago
Closed 19 years ago
width and height CSS-style attributes are not correct for SPAN or A tags
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: u130342, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
1.79 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
I tried to do some layouting using javascript by setting the style of an A tag to center an image inside of the a tag. I failed and after some time I found that width/height/min-width/min-height styles seem to be ignored for A and SPAN tags.
I believe this is probably true for other tags as well, but I didn't check.
My idea was to use
<a style="width:100px; height:100px; vertical-align:middle; text-align:center; "><img src="some.jpg"></a>
to center the image with fixed width and height of the A tag.
Because I really don't know how to describe this in words I created a test ff-bug.htm.
It appears on FF1.5.0.1 and on DeerPark 1.9a1: 2006020505 (A nighty I think).
Reproducible: Always
Steps to Reproduce:
1. open test-case (ff-bug.htm)
To be more impressive I've added a 120x120 div block around each
Actual Results:
width/height/vertical-align/text-align styles are ignored
Maybe there is a separate bug visible on box 2 and 4 of ff-bug.htm.
The box of the link should surround the image, but it is just as high as normal text (green border)
Expected Results:
see ff-bug.htm textual description
I think CSS is major feature!
IE looks better, but vertical-align is also not realized.
Sorry didn't find bug 34415.
But are you sure it's a dupe regarding the box of the A-tag?
Comment 4•19 years ago
|
||
Yes, <a> is an inline element.
*** This bug has been marked as a duplicate of 34415 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•