3 replies [Last post]
eytanchen
Offline
Regular
Last seen: 7 years 36 weeks ago
Timezone: GMT+2
Joined: 2006-11-21
Posts: 16
Points: 0

I am using background-image on links using css, for menu icons on a new site i am developing. it works great on IE (6 and 7), but the images do not appear at all on mozilla and opera:
http://www.wishlist.co.il/index_temp.php

I have validated the css using W3C validation. Here is a piece of css for the links:

a.icon_header_join:link, a.icon_header_join:visited, a.icon_header_join:active, a.icon_header_join:hover, a.iconOff_header_join:link, a.iconOff_header_join:visited, a.iconOff_header_join:active, a.iconOff_header_join:hover { height : 80px; width : 65px; background : url(images/headIcons_join.gif) no-repeat 0 0; } a.icon_header_join:hover, a.iconS_header_join:hover { background-position : 0 -160px; } I am changing the position of the backround-image on hover, for a rollover effect. much easier then using javascript.

Is this method only possible on IE, or am i missing something?

jnh
Offline
newbie
Last seen: 7 years 37 weeks ago
Timezone: GMT+8
Joined: 2006-11-20
Posts: 7
Points: 0

Hi there! This method is

Hi there!

This method is applicable in any browser. Laughing out loud

Btw, maybe you should set the display to block display:block.
It's just a guess. I'd try to do more investigation once I'm using my own computer.

cheers,
jnh

eytanchen
Offline
Regular
Last seen: 7 years 36 weeks ago
Timezone: GMT+2
Joined: 2006-11-21
Posts: 16
Points: 0

Works Now!

Thanks - that was the missing argument. it works now.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 23 hours 2 min ago
London
Timezone: GMT+1
Joined: 2004-06-06
Posts: 15650
Points: 2788

You have some other matters

You have some other matters that need attention:

You are using a quirks mode DTD you need to update that to either 'strict' or include the public identifier (url)

You shouldn't be using a windows character set it has no place in a standards world.

Your urls are technically malformed in a Unix environment you can't have spaces you should close them with dashes or underscores.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me