Quantcast
Channel: Background-Image in element - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by chaiboy for Background-Image in element

$
0
0

background-color:red; is being superseded by background:.

Combine your backgrounds. You can then refine it further by removing the quotes in the URL() of the background and the period from the URL. if it is relative to the location of the page it is on just remove the backslash.

<img border="0" style="display:block; width:20px; height:20px; padding:9px; background:#F00 url(images/system/button/close/close.png) no-repeat" />

Last if you need to have an alt attribute its contents will show up since there is no source. Use a transparent image if you add the alt.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>