Solved

GIF vs PNG

Posted on 2008-10-29
7
246 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JS Plugin 4 29
How can I get this SlideToggle to behave? 6 19
replace all occurrences within a string 8 19
Get the number of current month days 2 0
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now