hi there! ๐
Adding ::before
or ::after
to an HTML element means you're modifying its content, in programming terms you append content before or after the element's original content using CSS. You can't use pseudo-elements on image tags because images are so called replaced elements, meaning their content gets replaced by an external source, which is outside of the scope of CSS, and their content can't be modified directly.
Using a container div, which then can be modified is the most common way to solve the problem.
Hope this was helpful ๐
Good luck and happy coding! ๐
@nuraf9607
Posted
@kodan96 I Appreciate it man, for half an hour I was confused about why it wasn't working ๐คท, Now I get it