...

View Full Version : clickable content



timgolding
06-06-2007, 12:41 PM
Hi,

I am trying to make a clickable area of content. The clickable area will contain a mixture of text and images and styled boxes. The clickable area is encaptulated with in the training area div. I have put an anchor tag at the begining and at the end.

This works fine on Fire Fox but when i test with other browsers I am finiding that the cursor doesn't change as I hover the area. I can still click through but without the cursor changing appropriatly to a hand. No one would ever know they can click through.

Heres the relevant code:



<a style="text-decoration:none;" href="/sales"><div id="training_area">

<div class="product_areabox">

<img class="product_pic" src="images/train_it.jpg" />
<span style="padding:5px;">
<h6>IT Training</h6>
<p>
Training for your future?
Then you need an innovative
provider that deliver bespoke or
preset packages to meet your need.
Whether you are looking for basic IT
training, internet, web design or
creative workshops. Jamie's offers a
wide array of products competitively
priced that will meet your requirements.

</p>
</span>
</div>

</div>
</a>


Cheers :)

ahallicks
06-06-2007, 01:36 PM
This is basically because you can't place a div inside a link. Divs are block level whereas the a tag is inline, and you can't place block level tags within inline. Try changing the div to a span... or you can use javascript in the div, such as:

onclick="window.location('/sales'); return false"

God knows if that is right because I'm not javascript literate, but something along those lines should work. THis will help (http://bonrouge.com/~faq#divlink)

timgolding
06-06-2007, 02:08 PM
Thanks for that



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum