0

I used a free CSS slideshow I found on line and edited it, and I can't figure out how to add a default image. I created a fiddle to show my code: [link]

Also, in the code, the:

<img id="imageX" src="images/banners/X.png">

Does have an image show up. I'd show you but it's run on my localhost.

Thanks for the help.

2
  • What do you by mean saying "how to add a default image." ?
    – user1317647
    Apr 13, 2013 at 22:45
  • I meant by default image that when you visit the page this is located, it will show up without the URL having to have the #image1 on the end.
    – asbxzeeko
    Apr 13, 2013 at 22:51

1 Answer 1

0

I am guessing what you mean as a problem, is that when the slider is loaded img elements have opacity:0; left:-400px; z-index:1; and you only set

  #homebanner img:first-child {
     left: 0;
  }

so it does not display the first image at first, but you could do something like this instead

  #homebanner img:first-child {
     left: 0;
     z-index: 9;
     opacity: 1;
  }

(mostly the opacity here), to immediately display it.

This way the image also stays as a "default"/background image between the slide switching.

Here I also updated your fiddle and I added some random images for illustration: http://jsfiddle.net/tdU3Q/3/

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.