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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:01:13+00:00 2026-06-03T08:01:13+00:00

I have a grid of divs, and each has content in it: some text,

  • 0

I have a grid of divs, and each has content in it: some text, a picture and a [x] button of some sort. These divs all have position set to absolute (it’s a irregular grid, that’s why I chose to go with absolute).

What I want to do now is to have them expand when the mouse cursor is over them (and put it on top of other overlapping divs from the grid). I managed to do this here: http://jsfiddle.net/CvhkM/2833/ . The problem is that I want it to revert to its initial position and dimensions (each div has its own position and dimensions) and it won’t work for some reason… (note that this is my first time in jQuery). Oh, and might I add, how would I restrict it not to expand outside of a region (a rectangular region)?

  • 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-03T08:01:15+00:00Added an answer on June 3, 2026 at 8:01 am

    The overflow issue mentioned above definitely helps, and you can do that in your CSS. I would personally do overflow : hidden or overflow : auto, so that your overflowed content remains hidden until the box is hovered over.

    I’ve added code below to help you get your code to become dynamic, you can free to adjust the number on the hover animation as you please, and the multiplying factor, this is getting you a bit further in adjusting the size according to the original dimensions 🙂

    var multiplying_factor = 1.5;
    $(function() {
        $('.div').each(function() {
            $(this).data('original_position', $(this).offset());
            $(this).data('original_width', $(this).width());
            $(this).data('original_height', $(this).height());
    
            $(this).hover(function() {
                $(this).stop().animate({
                    left   : $(this).data('original_position').left - ($(this).data('original_width') * multiplying_factor / 4),
                    top    : $(this).data('original_position').top - ($(this).data('original_height') * multiplying_factor / 4),
                    width  : $(this).data('original_width') * multiplying_factor,
                    height : $(this).data('original_height') * multiplying_factor
                }, 300);
            },function() {
                $(this).stop().animate({
                    left   : $(this).data('original_position').left,
                    top    : $(this).data('original_position').top,
                    width  : $(this).data('original_width'),
                    height : $(this).data('original_height')
                }, 300);
            });
        });
    
    });    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some DIVs on a page. Each has 3 classes: grid_#, push_# and
I currently have a grid made out of square DIVs (200px x 200px each).
I have 4 divs set to float:left; each with a width: 400px; within a
I have a grid of divs that show some of my work (portfolio), and
I have a series of product divs in a grid, each of which is
I have just about finished adding all of the content to each page of
I have grid with some textboxes and an image which goes out of grid
I have a grid with some controls inside. I want to hide the grid
I have a gridview control with delete asp:ImageButton for each row of the grid.
I have build a grid of div's as playground for some visual experiments. In

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.