Closed Bug 44102 Opened 26 years ago Closed 26 years ago

link hover bounding size determined by font size

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: deneen, Assigned: waterson)

References

()

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m17) Gecko/20000627 BuildID: 2000062720 If you look at the sample page, the hover should (at least I think) be the size of the image. It appears that mozilla is determining the size of the hover based on font size, rather than the largest object inside the link. Reproducible: Always Steps to Reproduce: 1.go to the page. 2.put your mouse over the image 3.observe Actual Results: the background color and border color set in the hover only show around where the text would be if text was in the link. Expected Results: set the background color/border color around the entire image. (This is the area you can click on, i think it should be "hovered") I think this is different than the other bug regarding hovers. (That was about parent elements)
Setting the background-color of the img to inherit helps. See testcase for bug 36963 at http://www.pp.htv.fi/hsivone1/css-test/bitmapstyle.html I am not sure if this is bug as per CSS spec. IE 5 for Mac doesn't require background-color: inherit;, but it might be a bug in IE.
It isn't a problem with "backgroung-color:inherit". It is a Layout bug where the bounding box is not calculated properly. The width is correct but not the height. I'm going to attach a slightly modified testcase that makes it more obvious. Reassigned to Layout/waterson. I think I saw a similar bug a few months ago (good width / bad height for an element containing an image).
Assignee: pierre → waterson
Status: UNCONFIRMED → NEW
Component: Style System → Layout
Ever confirmed: true
If I parsed the spec correctly, the <a> element is an inline non-replaced whose box height is given by the line-height property, which is unaffected by the height if the image. http://www.w3.org/TR/REC-CSS2/visudet.html#q15 One thing to consider is putting a > img{ background-color: inherit; } in the UA stylesheet. However, that would make authors write pages that depend on a particular UA stylesheet. CCing py8ieh=bugzilla@bath.ac.uk
I understand how you can use the background-color: inherit; thing, but what if I wanted to have background and a border? border: inherit; almost gets it, but I get the border around the text bounding box and the image. I understand that I could place the hover on the image, but that will not work in mozilla and ie. I'm not sure I understand why the spec says to calculate the bounding box by the line height, if the image height is the area the user can click on in this case.
cc'ing dbaron, as well.
Status: NEW → ASSIGNED
This is not a bug, despite Pierre's desire for the CSS spec to be different from how it is. See http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html , section "Minor Typographical Errors", item "Section 10.6.1". Perhaps there should be a way to do this, but it's not in CSS now. CSS can't do everything.
INVALID?
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Not. Reopening, explanations are coming.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
A solution would be to support 'display:inline-block' in Layout (it doesn't seem to work right now) and declare the A element as inline-block in quirks.css. Marking 4xp anyhow.
Keywords: 4xp
NN 4.x didn't support hover. Do we really have to emulate IE's complicated behavior? Supporting inline-block (which isn't in any CSS rec. yet) is not trivial. Furthermore, future revisions of CSS may describe inline formatting in more detail, and be able to do this.
I marked '4xp' too quickly. The testcase I wrote doesn't work in WinIE5, only in MacIE5 and the results in Nav4x are too buggy to expect to do anything. For instance, if you set: a.graphic { border: 1px solid transparent; background-color: pink; } both the image and the text get a background-color and they are both surrounded with a single border as if 'A' was inline-block. But then, if you remove the border, as in: a.graphic { background-color: pink; } only the text gets the background-color and it gets it within a frame that has the image height... Marking Invalid again.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Keywords: 4xp
Resolution: --- → INVALID
Hmm, this is the second such bug I've come across today... VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: