|Remove white background around an image on my website|
On my website page, I've inserted an image in a php scripts and it has a white box around it. Image is saved in my "images" folder in my server.
I know how to remove the white back ground (Adobe Fireworks), so you just see the image.
What I want to know is now that I have my image with no background, how do I make it were the image does NOT show a white box on my webpage?
Thanks in advance,
[edited by: limbo at 10:41 pm (utc) on Dec 5, 2012]
[edit reason] missing quotes [/edit]
You have to find out where the white box is coming from. Off the top of my head:
--white parts of non-transparent image in non-white page, need to fix image itself (assuming either <= 256 colors, or alpha channel in browsers that support it)
--image margin non-zero on white-background page, needs CSS work
--image border non-zero with color white, ditto
--image padding non-zero if background-color of image div (or equivalent) is white, ditto
--(rare) if image is a link, browser supplies border and/or text-decoration unless told not to
Sorry, I forgot to mention that I have a blue background.
>>>white parts of non-transparent image in non-white page, need to fix image itself
Right. Is it saved as a gif, png, or jpeg?
It better not be jpg, since last time I looked, the format didn't support transparency :)
Well, you can still fake it-- I've had to, when it's a choice between that and a full-color png with alpha channel*-- but you have to remember to change the image again if you ever change the page color.
* Dual problems: filesize and browser support.