| Author |
Message |
drums
Toilet Drinker


Joined: 19 Jun 2003 Posts: 234
Location: Portland, OR
|
Posted:
Mon Aug 28, 2006 8:49 pm Post subject: CSS rollover Q |
|
I don't know wtf the deal is...
In css set as so:
.logo a:hover {background-image: url(images/logo-over1.jpg)}
Html as so:
<a href="somethn.com" class="logo"><img src="images/logo.jpg"></a>
Why aint the rollover happin'n?
TIA |
_________________
|
|
|
|
|
gregw
Tail-Wagger

Joined: 25 May 2003 Posts: 2990
Location: About 2000 miles south of where I want to be.
|
Posted:
Mon Aug 28, 2006 9:29 pm Post subject: |
|
Do you ever post anything except technical questions? A little contribution in other parts of this LBD goes a long way... |
_________________ Some people are like slinkys... not really good for anything but they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
|
fathertyme
Site Admin


Joined: 30 Jun 2001 Posts: 6821
Location: The American Colonies
|
Posted:
Mon Aug 28, 2006 10:09 pm Post subject: |
|
your CSS is wrong..
your precedence is wrong
a .logo:hover might work (not sure about the hover part)
or put the class tag into the image tag itself and use just .logo
so..
<img class="logo" src="images/logo.jpg">
but.. .logo a:hover is definitely wrong |
_________________ LWD web-cams: http://lwdcam.codecoma.com/?lwdcam
---
[9:08pm][09/16/2005]«+ flip » college...what is that
[9:08pm][09/16/2005]«+ Aff » apparently a place where you find rum
---
English doesn't just borrow from other languages, it follows them down dark alleys, smashes them over the head and roots around in their pockets for loose vocabulary.
---
I used to live in my own little world, but they didn't like me there either.
You see dead people? I'm a software engineer, I don't see anybody!
---
My Amazon Wishlist
---
-= Image removed because some have questioned it's appropriateness =-
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 5438
Location: /var/log/cabin
|
Posted:
Fri Sep 01, 2006 1:03 pm Post subject: |
|
You need to use :hover to hide the image and reveal the background, not the other way round. Showing the background on :hover won't overwrite the image that covers it. Here's something I prepared earlier that illustrates the technique:
http://www.matbooth.co.uk/misc/cssmouseover/
The comments in the CSS source should explain everything adequately, but if not, shoot me another question. Unfortunately, the (very legitimate) technique doesn't seem to work in IE6, which isn't surprising because that browser is spectacularly braindead. I haven't tried the new IE7.
Hope this helps. |
_________________ Pie. I wish I could
constrain my hungry greed but...
Sadly, defeated.
Charlene's Law: There's no such thing as can't.
Charlene's Corollary: Unless it's followed by be arsed.
I write more quotes than a fucking big book of quotes. - Scroobius Pip
|
|
|
|
|
Doomhammer
Leg Humper


Joined: 01 Jun 2004 Posts: 4700
Location: Utah
|
Posted:
Fri Sep 01, 2006 4:29 pm Post subject: |
|
CheeseMonger The Great wrote:You need to use :hover to hide the image and reveal the background, not the other way round. Showing the background on :hover won't overwrite the image that covers it. Here's something I prepared earlier that illustrates the technique:
http://www.matbooth.co.uk/misc/cssmouseover/
The comments in the CSS source should explain everything adequately, but if not, shoot me another question. Unfortunately, the (very legitimate) technique doesn't seem to work in IE6, which isn't surprising because that browser is spectacularly braindead. I haven't tried the new IE7.
Hope this helps.
Yeah, it works fine in non-half-assed browsers, such as Opera and Firefox, but IE6 just sucks way too much for this to work.
Although, there is a workaround for CSS rollovers in IE6... Just don't remember where I read about it. |
_________________ "The depth of your jealousy concerning my leetness astounds even me." - Ethan - CTRL+ALT+DEL
"Spare monies for a noob? Heal plz? How I mine for fish?" - Leo - VGCats # 160
"I hurt in my everywhere." - VGCats
Q: If a tree falls when nobody can hear it, does it make a sound?
A: Chuck Norris can hear it.
Lycander wrote:
see, the typical responses I see from Doomy follow a vein of: "wtf d00d, why are you doing it like that? do it like ME, because I'm ultimate roxxor LOLBBQ"
'Tis true LOL !
|
|
|
|
|
|
|