Login | Register | FAQ
Anonymous

How to remove white background of an image on my website

+ Post a reply

5 posts Page 1 of 1


How to remove white background of an image on my website

by pavz » Wed Oct 26, 2011 9:05 pm

i want to put an odd shaped image on my website but the white bit shows up I dont know how to get rid of it, but i do know how to do it on word.

PLEASE HELP!!!!!!!!!!!!!!!!!
User avatar

pavz

  • Posts: 5
  • Joined: Wed Oct 26, 2011 9:01 pm

Re: How to remove white background of an image on my website

by atik » Thu Oct 27, 2011 5:13 am

Hi pavz,
You have to use transparent png or gif image for this purpose. Don't use jpg, because it does not support transparency. And also set the image background color to transparent when styling in your css file.
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: How to remove white background of an image on my website

by pavz » Thu Oct 27, 2011 9:34 am

Thanks mate, but i have only started html and css so im only an amatuer. What would the code be for this then. Could you please give me an example i would really Appreciate it. Thanks anyway, you have been nothing but helpful!!
User avatar

pavz

  • Posts: 5
  • Joined: Wed Oct 26, 2011 9:01 pm

Re: How to remove white background of an image on my website

by atik » Thu Oct 27, 2011 1:10 pm

pavz wrote:Thanks mate, but i have only started html and css so im only an amatuer. What would the code be for this then. Could you please give me an example i would really Appreciate it. Thanks anyway, you have been nothing but helpful!!

Ok friend, here is a very simple html and css for you.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<title>my first html document</title>
<style>
#wrap {
width: 400px;
height: 400px;
background-color: red;
position: relative;
overflow: hidden;
}
img {
border: none;
position: absolute;
top: 50px;
left: 50px;
}
</style>
</head>
<body>
<div id="wrap">
<img src="http://html.net/site/graphics/pictogram.html.small.png" alt="sample image">
</div><!--end wrap -->
</body>
</html>
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: How to remove white background of an image on my website

by steveelkins » Mon Feb 27, 2012 10:45 pm

You should be able to go on your back end and remove the image. I use wordpress templates and this is simple to do for me. Do you intend on replacing the image with something else, or just leaving it blank?
User avatar

steveelkins

  • Posts: 12
  • Joined: Mon Feb 27, 2012 8:42 am
--
Is there a certain type of HTML I should be using when trying to create an e-commerce store that sells a survival seed bank supply? I want something that will help me to target gardeners that are interested in my product.


+ Post a reply

Page 1 of 1