Closed Bug 206866 Opened 22 years ago Closed 22 years ago

transparent image in anchor is, vertically, only semi-highlighted

Categories

(Core :: Layout: Block and Inline, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: fotang, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030507 After [a:hover {background-color:<some colour>}], and using a transparent image (<a ...><img .../></a>), the image is, in the vertical direction, only half-highlighted in the 'a:hover' background colour when mouse is over it. Maybe, as happens in MS Internet ExplOrer, the whole image should be highlighted. Reproducible: Always Steps to Reproduce: 1. define style background colour: a:hover {background-color: #ff9900} 2. create anchor containing a transparent .gif image: <a href='#'><img src=... height='20' /></a> 3. move mouse over link Actual Results: image isnt fully highlighted Expected Results: maybe image should be fully highlighted with the background colour defined for a:hover
I believe this is expected behavior. Just the area where the ALT text would be highlights. To get the whole image background to highlight, I set the link to display:block. I see this in the nav bar on my site (http://www.accessibleinter.net/). The top nav bar image is display:block, the bottom one is not. ->Layout B&I I think is more appropriate.
Assignee: dom_bugs → block-and-inline
Component: DOM Style → Layout: Block & Inline
OS: Linux → All
It has nothing to do with the ALT text. The style rule in question asks for the A element's box to have a background, and that's exactly what we do. If you want the image to have a background you need a style rule like: :link:hover, :visited:hover, :link:hover img, :visited:hover img { background: my-color; }
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
*** Bug 208092 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.