I'm trying to create an image gallery/menu with text info. I used CSS to create a gallery so that when you roll over one of the thumbnails, a larger image and new text displays above (basically by changing the content from 1px wide and high, so it's 'invisible', to 479px wide/180px high to fit in the box). That is fine, but once you move off the thumbnail, obviously the large image & text doesn't stay. I don't mind this for the 5ish% of people who have JavaScript disabled.
I'm trying to use JavaScript onmouseover to change the CSS and make the large image & new text stay - this works initially, but then when you go back to roll over another thumbnail, the onmouseover fails to work for a second time. I'm sure there must be an easy fix for this somewhere out there? I am a JavaScript beginner.
It will become clear when you see the link:
http://www.btinternet.com/~himh/piclink/
The JavaScript code is within the anchor tag to change the styling of the span:
<a class="gallery imagea" href="" onmouseover="document.getElementById('storya').style.position = 'absolute'; document.getElementById('storya').style.width = '479px'; document.getElementById('storya').style.height = '180px'; document.getElementById('storya').style.top = '10px'; document.getElementById('storya').style.left = '10px'; document.getElementById('storya').style.color = '#333333'; document.getElementById('storya').style.background = '#ffffff';">
<span id="storya">
<img src="dyn_graphics/feat/armour_vehicles.jpg" alt="" />
<br />
<div class="headline">Down the road, that's where I'll always be</div>
<br />
Every stop I make, I make a new friend. Can't stay for long, just turn around and I'm gone again. Maybe tomorrow, I'll want to settle down, Until tomorrow, I'll just keep moving on.
</span>
</a>
Thanks for any help. :)