# Adding a link to an empty Div with a background

**URL:** <https://forum.kirupa.com/t/adding-a-link-to-an-empty-div-with-a-background/223150>\
**Category:** web dev\
**Created:** [April 19, 2007, 9:58pm UTC](https://forum.kirupa.com/t/adding-a-link-to-an-empty-div-with-a-background/223150 "2007-04-19T21:58:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lemuel](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@Lemuel](https://forum.kirupa.com/u/Lemuel)\
**Post date:** [April 19, 2007, 9:58pm UTC](https://forum.kirupa.com/t/adding-a-link-to-an-empty-div-with-a-background/223150/1 "2007-04-19T21:58:41Z")

</div>

Hi

I’m stuck on a minor problem.

I’m building a CSS navigation based on CSS, Divs and lists.  
So far it looks and works alright, except now that I need to start applying links to the buttons.

Basically the Div that is the button is setup with a css background

```auto
background: url(toppicks/Button08-Contact.gif) repeat 0px 0px;

```

, and the background changes on hover

```auto
#Button08-Contact_:hover { 
        background: url(toppicks/Button08-Contact_O.gif) repeat 0px 0px;
}

```

Since the Div is basically empty except for the css applied background, how do I go about having something happen when someone click on it?  
I can’t seems to find reference to anything like:

```auto
#Button08-Contact_:click

```

Which is what I’d really like to use  
Do I have to move the button image from the background and place it into the box and use javascript to create a rollover and then link it?  
or do I have to create a 1x1 invisible gif to act as an invisible filler and trap for the click?

Hopefully you have suggestions of your own.

Thanks for your time.

-Lem
