Search code examples
csshtmloverlapoverlapping

Prevent div overlap with CSS


I have a problem with divs overlapping in http://web.corporativocipres.com.mx/

The issue is with the links in the footer (Corporativo - Historias Memorables Area de Prensa) they have after a div with the classmidbg trans that works like background but it overlaps and the link is unclickable.

I tried with different z-index but didn't work (or maybe I done this bad).

Thanks in advance


Solution

  • If you add a z-index: 1 to midbg, and add position: relative; z-index: 2 to .mid li, you'll fix the problem.

    The z-index property is definitely a weird one, and can act strangely when the position property isn't defined. Sometimes this is useful, sometimes it's not.