[TYPO3-english] GMENU with semi transparent PNG's

Rudy Gnodde (WIND Internet) rgn at windinternet.nl
Thu Nov 5 09:40:09 CET 2009

Hello Iztok,

Iztok Kham wrote:
> I have a GMENU with buttons (they are all the same) with drop shadow 
> over a background that is a bit different for each of them (there is a 
> gradient on the background).
> At the moment I have generic (ie. without text/name in it) images for 
> regular button, rollover button and active button. They all (except for 
> the active one) have a drop shadow. When I use semi transparent PNGs for 
> button background drop shadow is correctly applied, only background is 
> not transparent anymore.
> You can see what is rendered and what I need to come out here:
> http://www.studiokham.com/t3-probs/gmenu-dropshadow/
> What I would like to know is: is it possible to generate a GMENU with 
> semi transparent PNGs.
It is currently not possible to create alpha transparent PNG's with TYPO3.

> If that is not possible, is it then possible to define a background for 
> every menu entry.
> - First example: for the first entry use <image1.png> for background, 
> for second <image2.png> and so on.
> - Second example: use coordinates 0,0 to 160,46 from <big_bkg_image.png> 
> for first entry, coordinates 170,0 to 330,46 for second and so on (x 
> offset is in my case consistant - all buttons are of same width, so 
> first offest would be <entry_no>x<butt_width>).
> I would actually prefer the second example solution as I can create a 
> single image for background and then apply button with drop shadow over 
> it (and render link name over that). This way it would be pretty easy to 
> maintain background consistency.
> Is there a TypoScript way to achieve this?
Yes, it is possible to get this effect. If you read TypoScript by 
Example (chapter 7.8). They describe something similar which you can use.

However, why not use a TMENU and just set the alpha transparent PNG's as 
background with CSS?



More information about the TYPO3-english mailing list