Solved

GIF vs PNG

Posted on 2008-10-29
7
252 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can i get 4 nd 5 ? 3 31
Binding a Grid in Javascript 5 45
Character counter breaks after adding EmojiOne Area 4 23
asp.net open new page without popup blocker 8 19
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

830 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