By default the img tag is an inline element and it is not a container to add an after pseudo class. I'll suggest the following code:
div.container {
img {
display: block;
height: 58px;
left: 0;
position: absolute;
top: 0;
width: 58px;
z-index: 1;
}
&:after {
display: block;
background-image: url(images/frame.gif);
content: " ";
height: 58px;
left: 0;
position: absolute;
top: 0;
width: 58px;
z-index: 2;
}
}
Notice that the pseudo class is also a block element.