|Remove white background around an image on my website|
| 10:38 pm on Dec 5, 2012 (gmt 0)|
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]
| 11:28 pm on Dec 5, 2012 (gmt 0)|
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
| 2:01 am on Dec 6, 2012 (gmt 0)|
Sorry, I forgot to mention that I have a blue background.
| 2:07 am on Dec 6, 2012 (gmt 0)|
>>>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?
| 6:05 am on Dec 6, 2012 (gmt 0)|
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.