In the page found in below link(bg-button.html), I have put round image as a background using styles. But I find a gray background outside the image area. How can I make the background transparent, Please let me know?
Round image as background
views:
252answers:
3
+3
A:
You can add the following style to the button:
background-color: transparent;
Alternatively, use #fff
.
Blixt
2009-06-22 08:05:17
A:
Going off what the above poster said, you can generally get around this without thinking about it by just using shorthand, ala:
div#example { background: transparent url("imgurl.png") no-repeat top left; }
Ryan McGrath
2009-06-22 08:09:43
Using the shorthand does not require "transparent", as it is the default value. This would achieve the same effect: background: url("imgurl.png") no-repeat 0 0;
Blixt
2009-06-22 08:12:39
Yeah, I know. My comment was moreso towards building a pattern so you never have to think about it, it's automatic. ;)
Ryan McGrath
2009-06-22 17:48:05
+1
A:
You must edit the image in a paint program (like GIMP), add a transparency layer, remove the part you don't like with the eraser and save it as GIF or PNG.
Note that IE 6 doesn't handle PNG transparency without some tricks.
Aaron Digulla
2009-06-22 08:10:31