Reputation: 45
I am trying to set a divider image between links in the navigation bar. I currently have it set up as a background image, positioned to the right. This works fine, except I also want the divider to appear to the left of the first link. I have tried adding background-position:right,left;
to the first link class, but this doesn't work. Any ideas on how I would do this?
Upvotes: 0
Views: 103
Reputation: 3720
Assuming you don't need to support old school browsers, the easiest way is probably with multiple background images like this: http://jsfiddle.net/P25TC/1/
#nav li.first{
background:url(http://i.imgur.com/CED9fuN.png) no-repeat left, url(http://i.imgur.com/CED9fuN.png) no-repeat right;
}
Upvotes: 1