Results 1 to 3 of 3

Thread: css-based image gallery: default image?

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css-based image gallery: default image?

    Re the tutorial on http://www.dynamicdrive.com/style/cs...image-gallery/

    Several people have asked how to have a default image in the blank space before a thumbnail is moused over, but I can't find an answer anywhere. If you know, I need this information asap, with thanks

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Just add the image in your markup:
    Code:
    <span id="default"><img src="http://www.dynamicdrive.com/cssexamples/media/horses.jpg" /><br />Run wild with horses.</span>
    ...and have this CSS:
    Code:
    #default{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 5px;
    left: 238px;
    border: 1px dashed gray;
    color: black;
    text-decoration: none;
    z-index:40;
    top: 8;
    visibility:visible;
    }
    #default img{
    border:1px solid blue;
    margin: 0 5px 5px 0;
    }
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your quick and helpful response. I have added the css code to the style sheet and inserted the html in the page code. The default image is now sitting on top of the rollovers. How can I make it go behind them without using a layer? Much appreciated...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •