Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2013
    Posts
    27
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Hover image over image (div)

    Hey guys here's the deal:

    I'm trying to make a rollover image over an image (using divs),
    been struggling with it for pretty long now and just can't quite figure it out,
    here's the script if someone could do some CSS adjustments i would really appreciate it !

    http://dabblet.com/gist/5751524

  • #2
    Regular Coder
    Join Date
    Aug 2012
    Posts
    145
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Something like this?

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <style type="text/css">
    
    
    #normal {
    	position: absolute;
    	left: 472px;
    	top: 368px;
    	width: 500px;
    	height: 500px;
    	z-index: 1;
    }
    a span {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;  
    }
    a:hover span {
      display: block;
    }
    
    </style>
    
    </head>
    <body>
    
    <div id="normal">
      <a href="#">
        <img src="http://lokeshdhakar.com/projects/lightbox2/images/examples/image-2.jpg" alt="" />
        <span><img src="http://lokeshdhakar.com/projects/lightbox2/images/examples/image-6.jpg"/></span>
      </a>
    
    </div>
    </body>
    </html>
    1 Corinthians 15:3-4 / Ephesians 2:8-9 - What or Who are you living for? Jesus is returning very soon


  •  

    Posting Permissions

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