Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS LI hover - browser compatible?

NOOB question...

Does LI:HOVER{background:url(image.jpg) 0 0 no-repeat;} work across all browsers?

like image 222
tony noriega Avatar asked Aug 09 '10 21:08

tony noriega


People also ask

How do I enable hover in CSS?

The :hover CSS pseudo-class matches when the user interacts with an element with a pointing device, but does not necessarily activate it. It is generally triggered when the user hovers over an element with the cursor (mouse pointer).

Why is hover not working CSS?

Also, hover will not work if you use the wrong CSS format. Note that if you do not get the specificity right, the hover style will not work.

Can we use hover with Div?

To display div element using CSS on hover a tag: First, set the div element invisible i.e display:none;. By using the adjacent sibling selector and hover on a tag to display the div element.

What is @media hover hover?

Media Query Hover: Detecting a Pointer # The hover media query allows us to detect the user's primary input mechanism can hover over elements. It can have two values: none detects when the primary input mechanism can't hover or can't conveniently hover, like most cellphones and tablets.


2 Answers

IE versions older than 7 won't support it.

I recommend IETester.

Also, background-repeat is supposed to be defined before background-position, although most browsers will understand the values in whichever order they are given.

like image 95
David Hedlund Avatar answered Oct 15 '22 18:10

David Hedlund


http://www.quirksmode.org/css/contents.html , yes, but <= IE6 has some problems, but who cares?

like image 31
ThoKra Avatar answered Oct 15 '22 16:10

ThoKra