Share Posted July 18, 2016 Hello all - I would love some help figuring out the z-index. I have everything like I want, however; the black Nike check is not moving to the front (over top of the yellow check on hover). Take a peek at my codepen, any help is much appreciated! Thank you! nick See the Pen BzmJkL by squxd (@squxd) on CodePen Link to post Share on other sites
Solution Share Posted July 18, 2016 SVG 1.1 does not support CSS z-index or the SVG z-index attribute. z-index only works on HTML DOM elements that have position absolute, relative, or fixed.. which use the CSS Box Model. With SVG you have to rely on the order the SVG child elements appear. The last SVG child element will always have a higher z-index. Your SVG child <path> element #checkE is the last element. And that element is covering up your #checkYellow <path> The z-index attribute will only be available in SVG 2.0. https://www.w3.org/TR/SVG2/render.html So you might have to either hide #checkE or remove and prepend the SVG #checkE <path> so it is before the #checkYellow child <path> to bring it back. 8 Link to post Share on other sites