Can't highlight text even though z-index level is adequate

Hi.

Before I paste any links, a general advice might help me very much:

You sure know this case when you have say a slider caption — A row of text with absolute positioning above your relatively-positionied slider image.

Is there something else to cause the caption to be un-selected \ not-highlighted with the mouse when its z-index is high enough? (say, z-index: 999;).

I tried to search in Google “can’t highlight text css” but found some results about z-index. Maybe it has a slightly different phrasing in English; I don’t know the exact “slang” for this problem…

A link to the site with the problem would be best, Benos. That will save a lot of wild guessing. :slight_smile:

1 Like

Assuming the slider image and the slider text are both positioned and share the same positioned parent then a higher x-index item will appear on top.

If either items are nested inside a different positioned element that has a lower z-index then it’s their positioned parent’s z-index that dictates which is on top.

e.g. if a child has a z-index of 1000 but its parent is z-index:1 then it will only stay on top of other elements outside that context that have a z-index of less than 1 (or equal to 1 but earlier in the html).

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.