DEV Community


Discussion on: Ways to write BAD CSS

deyrupak profile image
Rupak Dey Author

Unfortunately, z-index is one of those properties that doesn’t always behave in an intuitive way. It seems simple at first; a higher z-index number means the element will be on top of elements with lower z-index numbers. But there are some additional rules that make things more complicated.

Anyway, all developers go by one rule : 'If it works, don't touch it!' 😂

So, if multiples of 10 or 100 is working, you know what to do 😂🤣