Results 1 to 10 of 10

Thread: CSS Popup Image Viewer - CSS Help

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

    Default CSS Popup Image Viewer - CSS Help

    Hi everyone.

    I have found your forum through searching for a script... so this is what want to do

    I want a photo gallery page that when you hover your mouse, the picture enlarges. I found the script

    http://www.dynamicdrive.com/style/cs...e-viewer/P230/

    this is exactly what I want to do.

    But I have never worked with css before

    so do I need to do both the css and the html?

    if I put thumbnails on the page will the css automatically pick that up?

    can you please give me some simple instruction.

    I work mainly with frontpage and have built some limited web sites - just simple stuff.

    thank you

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Yes you need both HTML and CSS in order to make this work. As far the HTML is concerned you have to change the HTML in a manner that it works for your purpose, but can treat the default HTML as a demo one.

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

    Default

    ok - well most of that has gone whoosh over my head!

    I will need to make a css page? with the code on it exactly as it is.

    Then the html I put on my web page and just the 'photo' details

    is that right?

    Can I use a ready made css page and add the code to it to save me the hassle?

    Where can I find ready made css pages?? (for an easy life)

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Please read our Posting Policies

  5. #5
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I'm sorry - I apologise most sincerely - I thought the forum was for asking questions - silly me!! I will go back to being ignorant - it was bliss.

  6. #6
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    this forum is for asking questions, but a title of "total newby" is not enticing for someone to look at it and try to help you.

  7. #7
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I did try to change it but it wouldn't let me - I could only change the message not the title - can somebody do that?

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

    Default

    I'll compile the codes for you. All you need to do is change the image source on the codes highlighted below.

    This will keep you going:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <style type="text/css">
    
    /*Credits: Dynamic Drive CSS Library */
    /*URL: http://www.dynamicdrive.com/style/ */
    
    .thumbnail{
    position: relative;
    z-index: 0;
    }
    
    .thumbnail:hover{
    background-color: transparent;
    z-index: 50;
    }
    
    .thumbnail span{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 5px;
    left: -1000px;
    border: 1px dashed gray;
    visibility: hidden;
    color: black;
    text-decoration: none;
    }
    
    .thumbnail span img{ /*CSS for enlarged image*/
    border-width: 0;
    padding: 2px;
    }
    
    .thumbnail:hover span{ /*CSS for enlarged image on hover*/
    visibility: visible;
    top: 0;
    left: 60px; /*position where enlarged image should offset horizontally */
    
    }
    
    </style>
    </head>
    <body>
    <a class="thumbnail" href="#thumb"><img src="media/tree_thumb.jpg" width="100px" height="66px" border="0" /><span><img src="media/tree.jpg" /><br />Simply beautiful.</span></a>
    <br/>
    <a class="thumbnail" href="#thumb"><img src="media/ocean_thumb.jpg" width="100px" height="66px" border="0" /><span><img src="media/ocean.jpg" /><br />So real, it's unreal. Or is it?</span></a>
    </body>
    </html>
    See if it helps
    Learn how to code at 02geek

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

  9. The Following User Says Thank You to rangana For This Useful Post:

    kristell (03-15-2008)

  10. #9
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    That is exactly what I was looking for - am very grateful - will go and try it out now.

  11. #10
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    It's working well so far - can you tell me though I would be able to have the thumbnails going across the page and then down rather than all on the left hand side. I have tried this but then the pop up's go missing!!

    Thanksx

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
  •