DHTML

Turning a background image into a clickable link

I had been trying to find the best approach to making my header logo into a clickable link that would return to the home page of one of my websites ( bearcatnews.com ). The problem was that I really wanted to leave the image inside my style sheet instead of marking it up inline.

Since there is no way that I know of to make a background image a clickable link, I decided to assign the "onclick" event to the div tag that contained my background image.

Here is the result:

HTML Markup -

<div id="header">
<div id="logo" style="width:300px;height:69px;cursor:pointer" onclick="location.href='/'"> </div>
</div>

Xinha = HTMLArea + active development

Just so you know, there is actually a fork of HTMLArea called
Xinha
which has alot of the bugs (that are currently in htmlarea) fixed. Most importantly, it is actively being developed where HTMLArea has pretty much died on the vine.

Syndicate content