The problem with other answers here is that they use position: absolute;
This makes it difficult to layout the element itself in relation to the ::before
pseudo-element. For example, if you wish to show an image before a link like this:
Here's how I was able to achieve the layout in the picture:
a::before {_x000D_
content: "";_x000D_
float: left;_x000D_
width: 16px;_x000D_
height: 16px;_x000D_
margin-right: 5px;_x000D_
background: url(../../lhsMenu/images/internal_link.png) no-repeat 0 0;_x000D_
background-size: 80%;_x000D_
}
_x000D_
Note that this method allows you to scale the background image, as well as keep the ability to use margins and padding for layout.