css3 “::after” pseudo-element not working
I want to add a triangle after a div tag.Therefore i used css3 after pseudo-element. But it's not working. Following is my css rule. .header-wrapper .part1 ::after { width: 0; height: 0; border-left: solid 48.35px #f21e1e; border-bottom: solid 48.35px transparent; border-top: solid 48.35px transparent; } Following is my html part <div class="header-wrapper"> <div class="part1"></div> </div> In order for the pseudo element to be generated, you need to specify a content value . The value is otherwise assumed to be the default, none - which is likely why it isn't working in your case. (example)