Click to See Complete Forum and Search --> : Problems with links


IxxI
06-03-2003, 03:02 AM
I have some divs with images in them, which I want to make links. So around them I shove my tags. But when I move my mouseover them although the lik displays in the status bar, my mouse cursor does not change and when I click on it nothing happens. If I right-click and say open in new window the link comes up - what's going on??
This is a sample of the code I'm using:

<script>
document.write('<a href='+parent.sub1big+'><div id="subbig1" class="biglink"');
document.write(parent.lnk1big);
</script>
</div></a>

where parent.lnk1big and parent.sub1big are variables called in the frameset page...

IxxI

AdamGundry
06-03-2003, 03:09 AM
Wrapping hyperlinks around <div> tags does seem to cause strange results. You could just apply your CSS id/class to the <a> tag directly, in which case you might need to change the <a> to to display: block.

Adam

IxxI
06-03-2003, 03:38 AM
Cheers Adam, tried that, but I've got another problem with them. I've changed it so that the link goes round the variable on the second line, which at the moment is an image, and as soon as I do this the images jump upwards. Any ideas o why this happens??

IxxI