Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icons or Transparent Bitmaps 2

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi people,

I have a webpage which has a load of items in a navigation frame. When I add a new item I want to add a little "NEW" icon or bitmap with a yellow font colour and a transparent background. I can't seem to make a bitmap have a transparent background - how can I achieve this? As an alternative I was testing my pages offline and loaded an ico file instead which I can set a transparent background for. This was exactly what I was after but now that I've uploaded it, it doesn't seem to recognise the ico file.

Can anyone shed any light on this?

Your help would be much appreciated!

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
You need a .gif file rather than a .bmp (doesn't support transparency) or a .ico (not really a web image format). Nearly all graphics packages will let you create a file as a gif.

Gif files have 256 colours. The transparency is achieved by setting one colour in the pallete to be transparent, so pick a colour that your graphic won't use - bright purple or something - and set that colour to be transparent.
 
You can also use png's for transparent backgrounds. These support millions of colours -> you might not need that many colours for a button though!

I've had some problems with pngs. Sometimes the colours will look different in different browsers. Anybody else seen this?

MrBelfry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top