This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Clickable Div Background image Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Clickable Div Background image" Watch "Clickable Div Background image" New topic
Author

Clickable Div Background image

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I have this div block in my html code

and in the CSS for the Div i have an image

I want the image to be clickable that is if you click the image the page navigates to another page, Please how do i accomplish this
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Just have to add the onclick handler to the div:



Eric
[ December 02, 2007: Message edited by: Eric Pascarello ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Clickable Div Background image
 
Similar Threads
converting html to pdf
Migrate HTML tables to CSS Positioning
DIV layout issues
location.href not working on FireFox 3.5
using CSS float attribute makes things 'leak' out of their containers ?