Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I made a Image with a transparent background on Paint.net and saved it as a png file. But for some reason when i add that image on my website the transparent background turns grey. I am not sure if a need to add some variable on my HTML line or if the image is not correct.
Posted
Comments
Naz_Firdouse 23-Apr-14 8:03am    
are you sure that the image you saved via paint has transparent background?

1 solution

Hello budy,

Well if you have done the image corectly, i mean you save it correctly, then the problem isn't in the image itself. Now try to load the image in a blank Html page without css to see if the problem is in the style! If the transparent work then try to fix the css in your website. Try to find the rule and fix it!

If you have more questions about this, feel free to ask! :)

O...don't forget to use always RGB colors! Now...if you want turn the style of the div in the image to ...

CSS
background: rgb(0, 0, 0);
/* RGBa with 0.5 opacity */
background: rgba(0, 0, 0, 0.5);


Otherwise just use an image with the opacity set on there. That would cover all browsers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900