Just a quick question and I can't find the answer. I heard somewhere that you can't (well you can but it won't conform to w3c standards) have the same z-indexes. Is this true? Can I have two <div>
elements with the z-index of 3? Thanks.
This is incorrect. It is valid to have multiple elements with the same z-index. To quote W3C's CSS2 spec:
Boxes with the same stack level in a stacking context are stacked back-to-front according to document tree order.
You can have two with the same index. they will just be layered in the order they appear in the html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With