March 15, 201511 yr I've run into an issue with multiple background images. When I turn off the second background-image, the first background-image is shown, or vise versa, how come I can't have multiple background-images successfully, what is going wrong ? #element { position:relative; background-image:url() // FIRST / TOP background-image:url() // SECOND / BOTTOM background-repeat:no-repeat/repeat //etc
March 15, 201511 yr Not had chance to test but off the top of my head try comma separating the url's on a single property: background-image: url('...'), url('..'); the way you wrote it one will override the other, it's aking to writing width: 50px; width: 100px -- The second width will override the first. Edited March 15, 201511 yr by rbrtsmith
March 15, 201511 yr Author Not had chance to test but off the top of my head try comma separating the url's on a single property: background-image: url('...'), url('..'); the way you wrote it one will override the other, it's aking to writing width: 50px; width: 100px -- The second width will override the first. Nope that didn't work
March 15, 201511 yr It would work. Problem is both images have the same backround-position, you need to define each one. eg. div { background-position: 0px 0px, center; } http://jsfiddle.net/5d7foo1p/
March 15, 201511 yr Author It would work. Problem is both images have the same backround-position, you need to define each one. eg. div { background-position: 0px 0px, center; } http://jsfiddle.net/5d7foo1p/ Thanks
Create an account or sign in to comment