Garrett Henry Garrett Henry - 1 year ago 35
HTML Question

Is it possible to use the same image twice in the background property?

I am making a navigation list, and I was wondering if there is a way to use the background property in css to place the image on both sides of the link when the user hovers over it. Here is what I have currently:

nav.vertical li a:hover {
background: #D4CD00 url(wnaderknight.png) right/25px 25px no-repeat;
color: black;

Answer Source

You may use multiple backgrounds or pseudos

.bg {
  background:url( right/25px 25px no-repeat,url( left/25px 25px no-repeat
.psdo:after {
<a href="#" class="bg"> link with bg image on both sides </a> <br/>
<a href="#" class="psdo"> link with bg image on both sides </a>