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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:06:45+00:00 2026-06-16T08:06:45+00:00

I have an Image with a border above it and I want a caption

  • 0

I have an Image with a border above it and I want a caption that slides ‘between’ them on hovering the image. I just can’t get it working the way I want, what I have is this:

<!DOCTYPE html>
<html>
    <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <meta content="utf-8" http-equiv="encoding">

        <link href="style.css" rel="stylesheet" type="text/css" />

        <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js " type="text/javascript"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js" type="text/javascript"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.js" type="text/javascript"></script>

        <script type="text/javascript">
            $(document).ready(function(){
                $('.boxGrid').hover(function(){
                    $('.boxCaption', this).stop().animate({bottom:'0px'},{queue:false,duration:300});
                }, function() {
                    $('.boxCaption', this).stop().animate({bottom:'-121px'},{queue:false,duration:300});
                });
            });
        </script>
    </head>
    <body>
        <div class="wrapper">
            <div class="boxGrid"></div>
            <div class="buttonBack blogImg">
                <div class="boxCaption">
                    <h3>Top-Blog</h3>
                </div>
            </div>
        </div>
    </body>
</html>

css

.wrapper
{
    position: relative;
    width: 226px;
    height: 246px;
}

.boxGrid
{
    width: 226px;
    height: 246px;
    background-image: url(http://s10.postimage.org/z2cp1i70p/button_Border.png);
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 100;
}

.buttonBack
{
    position: absolute;
    top: 12px;
    left: 13px;
    border: 0px;
    width: 200px;
    height: 223px;
    z-index: 50;
    overflow: hidden;
}

.blogImg
{
    background-image: url(http://s10.postimage.org/jflfo4t8p/blog_Button.png);
}

.boxCaption
{
    position: absolute;  
    background: url(http://s10.postimage.org/c2an2wykp/caption.png);
    height: 121px;
    width: 100%;
    bottom: -121px;
    text-align: center;
}

.boxCaption h3
{
    font-size: 30px;
    color: #fff;
}

But when I adit the html and jQuery like this, it works:

<!DOCTYPE html>
<html>
    <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <meta content="utf-8" http-equiv="encoding">

        <link href="style.css" rel="stylesheet" type="text/css" />

        <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js " type="text/javascript"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js" type="text/javascript"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.js" type="text/javascript"></script>

        <script type="text/javascript">
            $(document).ready(function(){
                $('.buttonBack').hover(function(){
                    $('.boxCaption', this).stop().animate({bottom:'0px'},{queue:false,duration:300});
                }, function() {
                    $('.boxCaption', this).stop().animate({bottom:'-121px'},{queue:false,duration:300});
                });
            });
        </script>
    </head>
    <body>
        <div class="wrapper">
            <!--<div class="boxGrid"></div>-->
            <div class="buttonBack blogImg">
                <div class="boxCaption">
                    <h3>Top-Blog</h3>
                </div>
            </div>
        </div>
    </body>
</html>

What I did is commenting the div.boxGrid out and let the jQuery function execute on hovering the div.buttonBack in place of the div.boxGrid. Only that’s not what I want, I want the div.boxGrid to be above all that, so I get this effect on hovering.

I’ve made a jsFiddle, here it doesn’t work, but like this it works…

Any help would be much appreciated, I’m pulling my hair out on this one.

  • 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-16T08:06:47+00:00Added an answer on June 16, 2026 at 8:06 am

    Your boxGrid class has higher z-index than buttonBack class. Fix it and then try…

    See the link : http://jsfiddle.net/wBjT3/5/

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

Sidebar

Related Questions

I want to have a UIView subclass that has a border image, but I
I have an image 100x40 and I want to add a border to the
I have image map that can I move, but this map will be so
I have a square image 40x40 that I want to make round via clipping,
I have image Array with two images out of that first image its showing
i have a div that it have image content .i wanna implement animation when
In Word you can place an image on a page and have the text
I want to have image button for browse and upload I have textbox using
I have many images tags that looks like below <img class=vCSS_img_alternate_product_photo id=alternate_product_photo_6 style=border-color:#666666; src=/v/vspfiles/photos/ChiWahGuitar-6S.jpg
I have a Java Swing application that i want to create a nice component

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.