HOME | DD

Vayde — Image replacement CSS

Published: 2008-09-01 22:12:10 +0000 UTC; Views: 809; Favourites: 7; Downloads: 11
Redirect to original
Description Simple image replacement CSS for your menus, etc. Enjoy!

Download to grab the code! (View source)

Live version here .



Will not work in Internet Explorer.
Related content
Comments: 28

Helewidis [2008-11-22 22:53:15 +0000 UTC]

for menus? and I downloaded the file and no css appears, only the live action...

👍: 0 ⏩: 1

Vayde In reply to Helewidis [2008-11-23 02:08:47 +0000 UTC]

Right click, "View Page Source"

You'll have to remove the comments when you put it into dA (/* these bits */)

It works by having two images, one which is offset to the right out of view (by using overflow:hidden), and then using the code so that when you hover over the link/image, the background position of the second image shifts to a new location on top of the old one (because of a higher z-index).

Have fun

👍: 0 ⏩: 1

Helewidis In reply to Vayde [2008-11-24 03:58:13 +0000 UTC]

it gives me an error D:
if its css why haven't you give it to us like everyone dows, in a notepad? my curiosity is killings me now... sniff, sniff...

👍: 0 ⏩: 1

Vayde In reply to Helewidis [2008-11-24 08:11:33 +0000 UTC]

Awww! It's probably a simple error but because I like you so much, here it is in a straight forward notepad viewable text file:

[link]

👍: 0 ⏩: 0

Beautelle-stock [2008-09-28 13:51:38 +0000 UTC]

haha nice work quite interesting thanks for using my stock btw!!

👍: 0 ⏩: 1

Vayde In reply to Beautelle-stock [2008-10-02 17:57:06 +0000 UTC]

Thanks, no problem

👍: 0 ⏩: 0

goth-chibi [2008-09-18 00:19:34 +0000 UTC]

firefox = #1

IE just plain sucks

google chrome is a bit better than IE, but will not catch up to ff anytime soon if ever,that is

👍: 0 ⏩: 0

packstrap [2008-09-03 13:04:36 +0000 UTC]

I'm using Internet Explorer, it works for me.

👍: 0 ⏩: 1

Vayde In reply to packstrap [2008-09-03 13:08:12 +0000 UTC]

The images will change on hover but I suspect that they will not line up properly and possibly also have flickery on-off nature! I'd be happily wrong though

👍: 0 ⏩: 1

packstrap In reply to Vayde [2008-09-03 13:14:44 +0000 UTC]

Okay, the "not lining up" bit is true. To be honest, though, I kind of thought that was intentional.

👍: 0 ⏩: 1

Vayde In reply to packstrap [2008-09-03 13:16:50 +0000 UTC]

Nope, they should line up on top of each other for proper "image replacement" otherwise its just kinda semi-replacement... lol

You would benefit so much more from dA if you used firefox instead of IE, you choice though

👍: 0 ⏩: 1

packstrap In reply to Vayde [2008-09-03 13:22:22 +0000 UTC]

Ha ha, I guess.

I keep hearing that, but I'm not really sure if the changes would be big enough to warrant switching.

👍: 0 ⏩: 1

Vayde In reply to packstrap [2008-09-03 13:55:10 +0000 UTC]

Yeah changing can be confusing at first especially if you've got used to something. I have written a news article on cool things you can do with firefox, but other benefits are things like better security, faster loading times and (lol) web pages that work as they are supposed to!

You can also easily transfer all of your bookmarks (favourites) etc over, and there's a really cool search bar for finding previous pages quickly.

People who have settled into Firefox sometimes scream at IE users because they don't know what they're missing lol but it's a personal choice

👍: 0 ⏩: 1

packstrap In reply to Vayde [2008-09-03 15:21:36 +0000 UTC]

Alright, I'll go download it. Thanks!

👍: 0 ⏩: 1

Vayde In reply to packstrap [2008-09-03 15:25:31 +0000 UTC]

No problem!

👍: 0 ⏩: 0

eldris [2008-09-01 22:55:06 +0000 UTC]

Who cares if it doesn't work in IE anyway

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-01 22:56:09 +0000 UTC]

lol about 80% of internet users

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-01 22:59:58 +0000 UTC]

pfft, only about 50% [link]

But no one cool enough to want/appreciate funky css uses IE

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-01 23:03:38 +0000 UTC]

lol apparently my random made up stat is 3 years old

IE is a royal pain in the butt! I refuse to code for it and I think all web developers should do the same, that way everyone using IE will get foobared pages and be forced to use a web standards compliant browser, and the world will be a better place!

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-01 23:56:55 +0000 UTC]

If only offices would use FF as default then coders could get away with ignoring it, but anyone doing commercial/business sites just can't I think my next homepage I make I'll just do that for FF, because let's face it no one but me goes there anyway

IE8 will probably be as close to standards compliant IE will get. It's downhill from there I think. Microsoft don't care. They're too big and think they can do anything -_-

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-02 09:02:14 +0000 UTC]

Aww I'll go to your homepage too... if I know where it is D:

Microsoft need to pull their ugly foot out of the internet browser market door and stop holding back web standards by doing so.

Ship all new computers with Fx instead!

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-02 17:11:44 +0000 UTC]

Yes, heck yes! I would so love it if microsoft bowed out of web browser production! I mean, I know you need SOMETHING on windows so you can download FF, but seeing as FF is not-for-profit what would microsoft have to lose by having windows come with it?

But of course to them that would be collaborating with the enemy

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-02 17:34:35 +0000 UTC]

Google just announced they're making a browser too lol

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-02 21:56:43 +0000 UTC]

Oh noes! Now Firefox has a rival

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-02 22:10:24 +0000 UTC]

I just hope it's standards compliant!

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-02 22:24:35 +0000 UTC]

I'm sure it will be Google aren't that stupid to risk bad publicity

👍: 0 ⏩: 1

Vayde In reply to eldris [2008-09-02 22:26:17 +0000 UTC]

Google will be making breakfast for us next!

Today the internets, tomorrow THE WORLD!

👍: 0 ⏩: 1

eldris In reply to Vayde [2008-09-02 22:29:24 +0000 UTC]

lol

👍: 0 ⏩: 0