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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:12:16+00:00 2026-05-25T18:12:16+00:00

I have a few Links/images sitting side by side in a container. The container

  • 0

I have a few Links/images sitting side by side in a container.
The container has its overflow property set to overflow: hidden and the images are ‘sunken’ into the container using margin-top: -50px;.

When the user hovers over the link I want the image to slide down out of the container and when the user hovers out the image jumps back up.

Here is a demo of what I have currently.

Here is my css ( I will post it all in case there are problems somewhere else that is causing this)

html, body {
    width:100%;
    height: 100%;
    margin:0;
    padding:0;
}
#w {
    display:table;
    width: 100%;
    height: 100%;
}
#iw {
    display:table-cell;
    text-align:center;
    vertical-align:middle;
    width: 100%;
}
#iiw {
    border-top: 1px solid #000;
    height: 125px;
    overflow: hidden;
}
#iiw a {
     margin-left: 8px;
     margin-right: 8px;   
}
#iiw a img {
    margin-top: -50px;
    height: 100px;
    -moz-box-shadow:0 0.8em 1em #444;
    -webkit-box-shadow:0 0.8em 1em #444;
    -o-box-shadow:0 0.8em 1em #444;
    box-shadow:0 0.8em 1em #444;
    -moz-border-radius:0 0 10px 20px;
    -webkit-border-radius:0 0 10px 20px;
    -o-border-radius:0 0 10px 20px;
    border-radius: 0 0 10px 20px;

}

and html HTML markup is

<div id="w">
    <div id="iw">
        <div id="iiw">
            <a href="#">
                <img src="http://stackoverflow.com/content/stackoverflow/img/apple-touch-icon.png" />
            </a>
            <a href="#">
                <img src="http://programmers.stackexchange.com/content/programmers/img/apple-touch-icon.png" />
            </a>
        </div>
    </div>
</div>

I’m using JQuery right now to do the hover events (for ease of use), however the final product will have no JQuery (so don’t comment on the JQuery code)


Edit I realize I left that code out.. oops.
very simple stuff. just using it to swap the margin-top property

$("a").hover(function() {
    $(this).children().css("margin-top", "-2px");
}, function() {
    $(this).children().css("margin-top", "-50px");
});
  • 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-25T18:12:17+00:00Added an answer on May 25, 2026 at 6:12 pm
    #iiw a {
        display: block;
        float: left;
    }  
    

    Them a tags need to be block level.

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

Sidebar

Related Questions

I have few links to .mp4 video files like file1.mp4 file2.mp4 file3.mp4 I need
How do I create subdomains in ASP.NET? I have few links on my homepage(Home.aspx)
I have a few links that should all open in the same window or
I have a few links across the page with the purpose of going to
I have a page with a few links that are all like this: <a
I have a div, containing text and a few links. I want to trigger
I have a master page which containing few CSS links and java scripts. <html
I have a few images I'm trying to normalize to a certain scale by
I have a table containing images and buttons. Each button has a tag with
I have seen quite a few tutorials on how to fade images in and

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.