Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Inline rollover Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Inline rollover" Watch "Inline rollover" New topic
Author

Inline rollover

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
I need to be able to do some kind of inline rollover on an image background
below is the code block i need to do it in. any help would be great

ORIGINAL


[ October 31, 2008: Message edited by: John Schretz ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am not sure why you would have lists with only one item in it. Pretty bad use of a list.

If I was going to do it, this is how I would:


If you want to go a JS route, you need to use onmouseover and onmouseout and set the this.style.backgroundImage or this.parentElement.style.backgroundImage

Eric
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
Hi i was able to get this working correctly with the following code. I just need to fix one thing. I need to set both mo Useovers background = to no repeat. How would i go by doing that?

TIA John





[ November 06, 2008: Message edited by: John Schretz ]
[ November 06, 2008: Message edited by: John Schretz ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6


Eric
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
That did the trick, thanks a million
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inline rollover
 
Similar Threads
el code showing on web page
converting html to pdf
How can I have a TAB inside my JSP
Menu image positioning
Not achieving space between div blocks containing lists