Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9180133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:58:16+00:00 2026-06-17T17:58:16+00:00

I want to let users expand thumbnail to see large profile pic on mouseover.

  • 0

I want to let users expand thumbnail to see large profile pic on mouseover. However, the rollover effect I have currently expands the table row to the size of the expanded image rather than showing the image over the surrounding text. Can anyone suggest a way to expand images on rollover without moving text around, in other words showing larger image on top of other html rather than pushing it out of way. I have tried z-index and this does not seem to work.

Here is a jsfiddle that demonstrates the problem:

http://jsfiddle.net/gLr9Q/

Here is same code as in js fiddle:

<script language="JavaScript">
  <!-- hide from non JavaScript Browsers
  image = new Array()
  image[0]= new Image(24,24)
  image[0].src = "http://womeninbiznetwork.com/wp-content/uploads/2011/07/logo-google.thumbnail.gif"
  image[1] = new Image(48,48)
  image[1].src = "https://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"
</script>
<tr><td colspan=2>
<p align="center"> 
<a href="contactdetail.php"
  onmouseover="newPic()"
  onmouseout="oldPic()">
<img src="http://womeninbiznetwork.com/wp-content/uploads/2011/07/logo-google.thumbnail.gif"
  name="pic" 
class="rollover"  
    border=0>
</a> 
</p></td></tr>
<tr><td>Here is text</td></tr>

js

function newPic(){
    document.pic.style.left="-24px";
    document.pic.style.top="-24px";
     document.pic.src = image[1].src;
    return true;
  }

  function oldPic(){
    document.pic.src = image[0].src; 
    return true;
  }

css:

#rollover {
  display: block;
  z-index:99;
  padding: 4px;
  position:relative;
  text-align:left;
  width:48px;
  background-color:#E8E8E8;
  opacity:1.0;
  filter:alpha(opacity=100); 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:58:17+00:00Added an answer on June 17, 2026 at 5:58 pm

    Stolen from CSSplay – magnify, you can do this without Javascript

    HTML:

    <tr>
        <td colspan=2>
            <p align="center">  <a class="rollover" href="contactdetail.php">
                <img src="http://womeninbiznetwork.com/wp-content/uploads/2011/07/logo-google.thumbnail.gif" name="pic" border="0"/>
                <span><img src="http://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/></span>
    </a> 
            </p>
        </td>
    </tr>
    <tr>
        <td>Here is text</td>
    </tr>
    

    CSS:

    a.rollover {
        display: block;
        position: relative;
    }
    a.rollover span {
        position: absolute;
        left: -10000px;
    }
    a.rollover:hover span {
        position: absolute;
        left: 200px;
    }
    

    JSFiddle

    Update:

    I don’t know, if this is what you have in mind, but you can position the larger image anywhere you want

    CSS:

    a.rollover:hover span {
        position: absolute;
        left: 120px;
        top: -20px;
    }
    

    JSFiddle

    If you want to hide the lower image on hover, you can try adding opacity: 0

    <img class="thumbnail" src="...">
    

    and

    a.rollover:hover .thumbnail {
        opacity: 0;
    }
    

    JSFiddle

    Although, I don’t know if this works on every browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have thousands of users and I want to make the passwords
I want to let users have links to their profiles using their registered usernames.
I have a model called UserPrice and I want to let users be able
I want to let users fill some metadata information i have created while uploading
We want to let users click a thumbs up or thumbs down button from
I want to let users upload Images. The file gets re-named (by adding the
In my open source app, I want to let users insert a picture/video/sound/etc .
I'm using CodeIgniter + Zend libraries. I want to let users upload videos to
I want to build a flash app to let me and my users snap
I want to implement functionality which let user share posts by other users similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.