Solved

GIF vs PNG

Posted on 2008-10-29
7
249 Views
Last Modified: 2012-06-21
can we make the GIFS just like PNGs and can get transparency out of it.
for eg if i place a gif on a background color, should be able to see the color thru the GIF.
<div style="background-color:blue"><img src="1.gif" />

thanks
1.gif
0
Comment
Question by:vidhubala
7 Comments
 
LVL 1

Expert Comment

by:toggo
ID: 22837692
Yes if you're using a transparent GIF.
0
 

Author Comment

by:vidhubala
ID: 22837997
how do we make transparent gifs?
0
 
LVL 8

Expert Comment

by:ccpjc
ID: 22838157
you just don't put any color in the area that you want transparent
if you are using adobe ps, make your button like you have it, select the text (ctrl+click in the layers box) click on your box shape (in the layers box) hit delete, then delete your text
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22838220
use adobe photoshop to make transparent photoshop files, with background set to transparent, and save to either GIF or PNG format interchangeably -- i.e. it can save the photoshop file to either format.
0
 

Author Comment

by:vidhubala
ID: 22838428
i couldnt make it transparent in photoshop. i tried all options but when i save it as gif with 128 no dither after applying 50% opacity. but when its displayed it becomes opaque. pl suggest steps in ps.

tra.gif
0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 22838499
GIF and PNG-8 don't support partial transparency.  You have to use the PNG-24 format for that. The problem is that IE6 doesn't natively support the partial transparency part of that format, so to get it to work you have to use a script like SuperSleight.

http://24ways.org/2007/supersleight-transparent-png-in-ie6
0
 

Author Comment

by:vidhubala
ID: 22838733
can u pl provide me an example of that code working in a html sample page.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question