214-564-5316
Saturday, February 04, 2012

CSS Invisible Buttons
This image is set in a div like this:
<div id="image"></div>
with this style:

<style type="text/css">
<!--
#image{
background-attachment:fixed;
background-image:url(images/browserdog_sm.jpg);
background-repeat:no-repeat;
width:500px;
height:412px;
}
-->
</style>

The challenge was to set a link on the top of the doggie's tag. This is easy to accomplish as a "hot spot" on top of an image inserted onto a page but quite another thing altogether when the image is set by CSS and not physically on the page at all.

One solution is to use a transparent button created in CSS.
Mouse-over the dog tag to see the link in action (it links to our examples page).



Here is the code for the button link:


Here is the style for the clear button: