Hi there, I am trying to create an image gallery on my home page http://www.antobbo.webspace.virginmedia.com/photography/home.htm
which gets displayed in the canvas. Ideally I would like to add some jquery to have a smooth transition between the images but I am getting a bit lost.
First of all I want to make sure that the images alternate, no matter the jquery for the time being, but I am having problems with that too
Here's the relevant code:
-the canvas(created in the containers.css) is:
.picture_box_home
{
clear:both; /* need to add this to make sure the navigation doesn't overlap it. Strangely, this doesn't happen in IE*/
/*background-color:red;*/
border:7px solid #7d003a;
width:716px;
min-height:541px;
margin:0 auto;
position:relative;
/*background: #000000 url(../images/test1.jpg) no-repeat;*/
}
.in_pic
{
border:4px solid white;
width:708px;
min-height:533px;
margin:0 auto;
position:absolute;
}
.in_pic1
{
border:4px solid #7d003a;
width:700px;
min-height:525px;
margin:0 auto;
position:absolute;
/*background: #000000 url(../images/test1.jpg) no-repeat;*/
}
In my html page (in the <body></body>
)I have the script:
<script type="text/javascript">
function swapImages()
{
var myImages = new Array("images/test1.jpg", "images/test2.jpg", "images/test3.jpg");
randomImage = Math.floor(Math.random()*myImages.length);
document.write(myImages[randomImage]);
}
</script>
Now, the images are not displaying, is it because I got the script wrong and because I have that "funny" situation with boxed layered up in the css?
any help much appreciated
thanks