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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

menus and images

Status
Not open for further replies.

Halcrow

Programmer
Aug 24, 2004
76
GB
Hi there,

I've made a menu (structured as a list), the links of which contain both text and an image of a small arrow. The arrow is of course a square gif, so I initially set the "containing space" (my definition would be the space in the gif where the arrow isn't - the extra space filling the square) to the same colour as the backgound of my menu.

I also have a hover feature in my style-sheet that changes the colour of the background when the mouse hovers over the link. Of course, when this happens the arrow sits on a square of different colour (the original background colour). I want this colour to change when the mouse hovers over the link.

To fix this, I set the spare space in the gif to transparent. This now causes the spare space to take on the colour of body, not the list items like I would like it to. I would like the transparent space to take on the back-ground colour of the containing div, not the body.

What can I do to fix this?

Thanks
Calum
 
Could you post code or, preferrably, show us a link of your site? This is definitely an achievable goal, but I, like some others, can help best after seeing the problem.

*cLFlaVA
----------------------------
Ham and Eggs walks into a bar and asks, "Can I have a beer please?"
The bartender replies, "I'm sorry, we don't serve breakfast.
 
I can't show you the site yet - I tried to make an example but the problem worked in it! I think it's some kind of div layer problem, maybe the transparency root right back to the first layer that has a define background colour or something!

The example is at:

As I said, it works fine, but when it is pasted into my site, the background is always white.

Thanks for your interest
Calum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top