Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

Benben pro asked 6 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 6 years ago


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

<li>first item</li>

<li>item</li>

<li>item</li>

</ul>
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.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

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