Hello!

I would like to create a clickable backround for my IPB forum board.
It will act as a banner and when clicked, it will redirect to the advertiser webpage.

Here's the AdOcean demo of what I would like to create:

http://demo.adocean-global.com/main.php?x=BI&y=Background%20Image

Please, give any advice on how to implement such function on IPB board.

Thanks in advance!

I went to the page and did not see a clickable background; it may be that the page has been updated.

I didn't see a clickable background on the linked page either.
If I had to do such a thing, I would probably create a DIV as the first thing inside the BODY,

<body>
    <div id="clickable-bg"></div>

and set its styles to

position: fixed;
width: 100%;
height: 100%;
cursor: pointer;
background: transparent url('path/to/img.jpg') no-repeat 0 0;
z-index: 0; /*EDIT*/

Then use javascript to add a click event to the div (using jQuery here)

$(function() {
    $('#clickable-bg').click(function() {
        window.location = 'your/URL/here.html';
    }
});

EDIT:
You would also need to add a z-index to this div, as well as your main content div and anything you want appearing above this background.

Another thought, and I don't know if this would work, could be wrapping the whole div with an <a href=""> tag if you're using HTML5. This would be an alternative to the javascript. Not sure what the cross-browser implications would be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.