homepage Welcome to WebmasterWorld Guest from 54.226.80.196
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderator: open

Site Graphics and Multimedia Design Forum

    
Remove white background around an image on my website
Scotty13




msg:4525485
 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,
Scotty

[edited by: limbo at 10:41 pm (utc) on Dec 5, 2012]
[edit reason] missing quotes [/edit]

 

lucy24




msg:4525499
 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

Scotty13




msg:4525514
 2:01 am on Dec 6, 2012 (gmt 0)

Sorry, I forgot to mention that I have a blue background.

martinibuster




msg:4525515
 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?

lucy24




msg:4525543
 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved