View Full Version : Javascript not appearing correctly in a div

08-31-2006, 09:21 PM
Hi, hoping someone can help me with two problems.....

I'm designing a site which uses javascript to randomly pull in one of four pictures. When the javascript isn't in the html all the divs appear correctly, however once the javascript is in it leaves a gap at the top of the div.

File without javascript is here: http://www.james-cook.dsl.pipex.com/test/withoutjavascript.htm

with javascript is here:

stylesheet is here:

To see the problem correctly the div that the pictures sit in is coloured fuchsia!!

Is there a problem with the script? I don't know javascript at all, i just inherited this from the old site coded in html and laid out using tables (which worked ok)!

The second problem is that whatever 'ad' the javascript has pulled in turns the 'Hot Links' heading into a link!! Its as if the javascript hasn't been ended properly or something. The 'Hot Links' title is a h6 in a completely seperate div!

I'm guessing this isn't a css problem but should I post it on that forum as well?

Thanks in advance

08-31-2006, 09:42 PM
try to erase a <P> tag that covering your <SCRIPT> tag