why is .obj::after not showing? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

why is .obj::after not showing?

code: https://codepen.io/AlexTAG/pen/vYgVLgW?editors=1100 For some reason the .obj::after does not show. Help

20th Apr 2021, 7:41 AM
๐Ÿ‡ Alex Tuศ™inean ๐Ÿ’œ
๐Ÿ‡ Alex Tuศ™inean ๐Ÿ’œ - avatar
1 Answer
+ 4
FYI ::before and ::after Don't work on <img>s as they don't contain text they are made for images as its name tells Do for that you can just wrap your images in a <div> and put the image in it and then use ::after on that div ๐Ÿ‘ You would have got the answer if you searched it on Google ๐Ÿ‘ A stackoverflow article explains the same https://stackoverflow.com/questions/5843035/does-before-not-work-on-img-elements
20th Apr 2021, 1:29 PM
Arnav Kumar [Less/Not Active]
Arnav Kumar [Less/Not Active] - avatar