Is it possible to display:block;
the :after
pseudo-element when I hover over the parent element itself?
#myDiv{
position:relativ
You are trying to reference the same element, so you don't need to duplicate the ID selector. No need to use the child selector either, just use:
#myDiv:hover:after {
display: block;
}
jsFiddle Demo
Change it to #myDiv:hover::after
You can use either :after
or ::after
but in the selectors module (3) it states that the latter is now intended to be used to distinguish them from pseudo-classes