Topic: :hover does not work on first li un ul list whatever the list

Benben pro asked 4 years ago

a simple css such as adding a background-color to li on :hover has no effect on the first li in a list.Eg:

<ul> <li>first item</li> <li>item</li> <li>item</li></ul>

The first item does not respond to :hover. I am guessing you have some JS of sorts happening here and this is rather bothersome. Could you point me in the right direction or fix it?

Damian Gemza staff answered 4 years ago

Dear Benben, i'm unnable to reproduce your error. For me, everything works fine with code:

<li>first item</li>



li:hover {

background-color: red;

Every which i hover get background-color: red Do you have more complicated code to test? Best Regards, Damian

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No