Results 1 to 8 of 8

Thread: Image hover and change

  1. #1
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Talking Image hover and change

    Yeah so here is my problem i want a page like this with the 4 panels and the same hover effect I have tried to find some I looked everywhere I found some other cool codes but nothing that helped me do that can anyone help?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Do you want the image to change? Get lighter? Have the image change and text? Or Get lighter and Text?
    Jeremy | jfein.net

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

    Default

    You should prepare two images, the hovered image and the default image.
    See basic example:
    Code:
    <style type="text/css">
    img{width:300px;height:250px;}
    #wrap{width:650px;padding:10px;margin:auto;}
    </style>
    <div id="wrap">
    <img src="http://h1.ripway.com/rangana/images/Picture1.png" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture5.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture1.png'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture2.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture6.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture2.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture3.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture7.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture3.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture4.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture8.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture4.jpg'">
    </div>
    Hope 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!

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

    berkley (07-11-2008)

  5. #4
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    You should prepare two images, the hovered image and the default image.
    See basic example:
    Code:
    <style type="text/css">
    img{width:300px;height:250px;}
    #wrap{width:650px;padding:10px;margin:auto;}
    </style>
    <div id="wrap">
    <img src="http://h1.ripway.com/rangana/images/Picture1.png" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture5.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture1.png'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture2.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture6.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture2.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture3.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture7.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture3.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture4.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture8.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture4.jpg'">
    </div>
    Hope it helps.
    yes thats awesome and I put a <a href="link"> around the <img> tag to hyper link them right?

  6. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yes. Your right.
    But when you do this it will also include a border, so you would want this:
    Code:
    <style type="text/css">
    img{width:300px;height:250px;border:none;}
    #wrap{width:650px;padding:10px;margin:auto;}
    </style>
    <div id="wrap">
    <img src="http://h1.ripway.com/rangana/images/Picture1.png" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture5.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture1.png'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture2.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture6.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture2.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture3.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture7.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture3.jpg'">
    
    <img src="http://h1.ripway.com/rangana/images/Picture4.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture8.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture4.jpg'">
    </div>
    And then to include the links:
    Code:
    <style type="text/css">
    img{width:300px;height:250px;border:none;}
    #wrap{width:650px;padding:10px;margin:auto;}
    </style>
    <div id="wrap">
    <a href="#"><img src="http://h1.ripway.com/rangana/images/Picture1.png" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture5.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture1.png'"></a>
    
    <a href="#"><img src="http://h1.ripway.com/rangana/images/Picture2.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture6.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture2.jpg'"></a>
    
    <a href="#"><img src="http://h1.ripway.com/rangana/images/Picture3.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture7.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture3.jpg'"></a>
    
    <a href="#"><img src="http://h1.ripway.com/rangana/images/Picture4.jpg" alt="myimage" onmouseover="this.src='http://h1.ripway.com/rangana/images/Picture8.jpg'" onmouseout="this.src='http://h1.ripway.com/rangana/images/Picture4.jpg'"></a>
    </div>
    Change the highlighted # to your link.

    @Rangana, cool pics, where'd you get them?
    Jeremy | jfein.net

  7. #6
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    alright cool thanks again guys thanks so much =)

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

    Default

    Quote Originally Posted by Nile View Post
    @Rangana, cool pics, where'd you get them?
    Haha. Thanks, that was an image from a PPT that I have
    Learn how to code at 02geek

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

  9. #8
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    whats PPT?

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
  •