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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:31:04+00:00 2026-05-31T11:31:04+00:00

I have a div container broken into quadrants. Each quadrant has an image the

  • 0

I have a div container broken into quadrants. Each quadrant has an image the size of the container, but cropped to that quadrant. On mouseover I want to make the quadrant expand to fit the container. My challenge is positioning the images with in the DIV. The top left image is fine, all the other images align to the top left of the span they are in and I need all of the images to align themselves at the top left. See this fiddle it may will make more sense looking at it.

Basically all the images should have the same position, stacked exactly on top of each other with only one quadrant exposed based on the z-index and which span they are in. jquery will reveal the full image on mouseover.

Just in case you didn’t see the fiddle here:

    <!DOCTYPE html>
    <html>
    <head>

      <script src="http://code.jquery.com/jquery-latest.js"></script>
<style>
  #containter {background: black; height:500; width:800px; padding:0px; overflow: hidden;}
  #top-left {position: absolute; top:0px; left: 0px; height:250px; width:400px; padding:0px; overflow: hidden; z-index: 1; }
  #top-right {position: absolute; top:0px; left:400px; height: 250px; width:400px; overflow:hidden;z-index: 2;}
  #bottom-left {position: absolute; top:250px; left:0px; height:250px; width:400px; padding:0px; overflow: hidden; z-index: 3; }
  #bottom-right {position: absolute; top:250px; left: 400px; height:250px; width:400px; padding:0px; overflow: hidden; z-index: 4; }
</style>
    </head>
    <body>

    <div id="box">
        <span id="top-left">
            <image src="http://2.bp.blogspot.com/_Otv4_7K3yfk/TTxZykkA4cI/AAAAAAAAAcM/bQFOHrc5fyQ/s1600/Wallpapers_Nature+%25288%2529.jpg">
        </span>
        <span id="top-right">
            <image  src="http://www.adywallpapers.com/nature/260_nature_wallpapers.jpg">
       </span>
       <span id="bottom-right">
                    <image src="http://www.adywallpapers.com/nature/101_nature_wallpapers.jpg">
        </span>
        <span id="bottom-left">
                    <image src="http://www.adywallpapers.com/nature/192_nature_wallpapers.jpg">
        </span>     
    </div>

    <script>
      $("#top-left").mouseover(function() {
            $( this ).css( "width","+=400");
            $( this ).css( "height","+=250" );
            $( this ).css("z-index", "100");
        });
      $("#top-left").mouseout(function() {
            $( this ).css( "width","-=400");
            $( this ).css( "height","-=250" );
            $( this ).css("z-index", "1");
        });
      $("#bottom-left").mouseover(function() {
            $( this ).css( "width","+=400");
            $( this ).css( "height","+=250" );
            $( this ).css("z-index", "100");
        });
      $("#bottom-left").mouseout(function() {
            $( this ).css( "width","-=400");
            $( this ).css( "height","-=250" );        
            $( this ).css("z-index", "3");
      });

    $("#top-right").mouseover(function() {
            $( this ).css( "width","+=400");
            $( this ).css( "height","+=250" );
            $( this ).css("z-index", "100");
        });
    $("#top-right").mouseout(function() {
            $( this ).css( "width","-=400");
            $( this ).css( "height","-=250" );
            $( this ).css("z-index", "2");        
       });
    $("#bottom-right").mouseover(function() {
            $( this ).css( "width","+=400");
            $( this ).css( "height","+=250" );
            $( this ).css("z-index", "100");
       });
    $("#bottom-right").mouseout(function() {
            $( this ).css( "width","-=400");
            $( this ).css( "height","-=250" );    
            $( this ).css("z-index", "4");        
    });
    </script>

    </body>
    </html>

Thanks

  • 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-31T11:31:06+00:00Added an answer on May 31, 2026 at 11:31 am

    Figured it out. click here to see the fiddle Now to animate or fade the transition.

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

Sidebar

Related Questions

I have a div container with a text that has been previously typed in
I have a container div that holds two internal divs; both should take 100%
I have a container (div) with a background image. In this div there is
I have an animation on a partially hidden div container that will execute when
I have a DIV container that is a CSS class defined on the top
I'm making a webpage where I have a div (container) that is a parent
I have a DIV container that draws a list of bars (al container 'onmousemove'
I have a div container that is 600px wide and 30px high, and it
I have a div container that gets its content modified every 3 seconds by
In Theory I have a div (container) that when hovered over one of its

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.