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 6037831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:07:52+00:00 2026-05-23T06:07:52+00:00

I use this simple script : <body> <script type=text/javascript> function mouseOver() { document.getElementById(img1).src =images/p2.jpg;

  • 0

I use this simple script :

<body>
 <script type="text/javascript">
function mouseOver()
{
document.getElementById("img1").src ="images/p2.jpg";
}
function mouseOut()
{
document.getElementById("img1").src ="images/p1.jpg";
}
</script>
<div class="img">
 <a target="_blank" href="images/p1.jpg"><img src="images/p1.jpg" alt="Klematis" width="110" height="90" id="img1" onMouseOver= "mouseOver()" onMouseOut="mouseOut()"/></a>
 <div class="desc">Add a description of the image here</div>
</div>

The images are pretty big so I adjust them with width and height properties, I thought that if I just call the function I’ll see the bigger image but it dosen’t happen.So what can I do to see an enlarged image with onMouseOver?
I’ll add the style sheet in case it matters:

<style type="text/css">
div.img
{
  margin: 2px;
  border: 1px solid #0000ff;
  height: auto;
  width: auto;
  float: left;
  text-align: center;
}
div.img img
{
  display: inline;
  margin: 3px;
  border: 1px solid #ffffff;
}
div.img a:hover img {border: 1px solid #0000ff;}
div.desc
{
  text-align: center;
  font-weight: normal;
  width: 120px;
  margin: 2px;
}
</style>

P.S

Don’t mind the <a href thing I just use the raw code from w3 schools…

P.S Maybe I’ll ask another question for this, the problem with the enlarged images is solved but now I want them to show in some kind of block cause now if I have even 4 iamges when i hover the last one the enlarged image goes far away from the starting location, and I want to make it just like gallery block and all images ot be shown there, wthout going outside the borders of the gallery.Any help or maybe another Qs better….

  • 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-05-23T06:07:53+00:00Added an answer on May 23, 2026 at 6:07 am

    In your css you could do this:

    div.img img { height: 90px; width: 110px; }
    div.img img:hover { height: auto; width: auto; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is simple. What function would I use in a PHP script to
I am looking for a simple script that I can use to send some
Hi i use the following simple jquery script to append input. Source http://muiomuio.com/web-design/add-remove-items-with-jquery <html
I want to use JavaScript to make a simple http get. I used jQuery
I use this tool called Lazy C++ which breaks a single C++ .lzz file
I use this line in my .htaccess file to automatically add a trailing slash
Can I use this approach efficiently? using(SqlCommand cmd = new SqlCommand(GetSomething, new SqlConnection(Config.ConnectionString)) {
I'm trying to use this layout with two 50% column width instead. But it
I tried to use this on my class library mylib.core.data.dll and got a successful
I am trying to use this in my page class. I only just started

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.