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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:56:49+00:00 2026-05-30T18:56:49+00:00

I have a straight-up CSS hover, however, I am encountering 2 problems: 1) It

  • 0

I have a straight-up CSS hover, however, I am encountering 2 problems:

1) It is hovering too far to the right when it should be appearing just above the thumbnail (centered up)
2) It is hovering in the same place, no matter which thumbnail- it should be relative to the thumbnail position so it hovers directly above it in the center

I’ve tried several times and it just won’t budge.
Originally I had it wrapped in a … however that can’t be possible because the tooltip on-hover requires a text link in it.. the good old, ‘you can’t have an a within an a’ issue. Therefore I have used .

What must change in CSS (preferrably) or in HTML to make this function as highlighted in those 2 points above?

Code

<html>
<head>
<style type="text/css">
a:link,
a:visited {
position:relative;
text-decoration:none;
}

a .tooltip img {
border:none;
}

.tooltip {
width:100px;
position:absolute;
bottom:100%;
margin:0 0 7px 0;
padding:15px;
font-weight:normal;
font-style:normal;
text-align:CENTER;
text-decoration:none;
text-shadow:0 1px 0 rgba(255,255,255,0.3);
line-height:1.5;
border:solid 1px;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
-moz-box-shadow:
0 1px 2px rgba(0,0,0,0.3),
0 1px 2px rgba(255,255,255,0.5) inset;
-webkit-box-shadow:
0 1px 2px rgba(0,0,0,0.3),
0 1px 2px rgba(255,255,255,0.5) inset;
box-shadow:
0 1px 2px rgba(0,0,0,0.3),
0 1px 2px rgba(255,255,255,0.5) inset;
cursor:default;
display:block;
visibility:hidden;
opacity:0;
z-index:999;
-moz-transition:all 0.4s linear;
-webkit-transition:all 0.4s linear;
-o-transition:all 0.4s linear;
transition:all 0.4s linear;
}

.tooltip:before,
.tooltip:after {
width:0;
height:0;
position:absolute;
bottom:0;
margin:0 0 -20px -10px;
border:solid 10px;
border-color:transparent;
display:table-cell;
content:"";
}

.tooltip:before {
margin:0 0 -24px -12px;
border:solid 12px;
border-color:transparent;
z-index:-1;
}

/* hover */

span.tooltipwrapper:hover .tooltip {
text-decoration:none;
visibility:visible;
opacity:1;
-moz-transition:all 0.2s linear;
-webkit-transition:all 0.2s linear;
-o-transition:all 0.2s linear;
transition:all 0.2s linear;
}



/* POSITIONS */

/* LEFT */

.tooltip,
.tooltip.left {
left:0;
right:0;
}

.tooltip:before,
.tooltip:after,
.tooltip.left:before,
.tooltip.left:after {
left:40px;
right:auto;
}


/* CENTER */

.tooltip.center {
left:50%;
right:auto;
margin-left:-65px;
}

.tooltip.center:before,
.tooltip.center:after {
left:50%;
right:auto;
}


/* RIGHT */

.tooltip.right {
left:auto;
right:0;
}

.tooltip.right:before,
.tooltip.right:after {
left:auto;
right:40px;
}

.tooltip.right:before {
margin-right:-2px;
}


/* SPEECH BUBBLE */

.speechbubble {
position:relative;
left:auto;
right:auto;
bottom:auto;
margin:0 0 12px 0;
cursor:text;
display:block;
visibility:visible;
opacity:1;
}


/* COLORS */

/* APPLE GREEN */

.tooltip.applegreen {
color:#445400;
background:#8DB600;
background:-moz-linear-gradient(top,rgba(141,182,0,0.8),rgba(141,182,0,1));
background:-webkit-gradient(linear,left top,left bottom,from(rgba(141,182,0,0.8)),to(rgba(141,182,0,1)));
border-color:#7C9902;
}

.tooltip.applegreen:before {
border-top-color:#7C9902;
}

.tooltip.applegreen:after {
border-top-color:#8DB600;
}
</style>
</head>
<body>
rollover images for larger view<br />
<span class="tooltipwrapper">
<img src="http://i3.kym-cdn.com/entries/icons/original/000/000/015/orly.jpg" alt="" width="20" height="20" />
<span class="tooltip center applegreen">
<img src="http://i3.kym-cdn.com/entries/icons/original/000/000/015/orly.jpg" alt="" width="80" height="80" />O RLY?<br/><a href="http://i3.kym-cdn.com/entries/icons/original/000/000/015/orly.jpg">Link to image</a>
</span>
</span> 
<span class="tooltipwrapper">
<img src="http://thumbs.myopera.com/sz/colx/drlaunch/albums/37656/no-wai001.jpg" alt="" width="20" height="20" />
<span class="tooltip center applegreen">
<img src="http://thumbs.myopera.com/sz/colx/drlaunch/albums/37656/no-wai001.jpg" alt="" width="80" height="80" />NO WAI!!!<br/><a href="http://thumbs.myopera.com/sz/colx/drlaunch/albums/37656/no-wai001.jpg">Link to image</a>
</span>
</span>
</body>
</html>
  • 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-30T18:56:50+00:00Added an answer on May 30, 2026 at 6:56 pm

    Give position:relative to your .tooltipwrapper DIV because .tooltip is absolute position . Write like this:

    .tooltipwrapper{
     position: relative;
    }
    

    Read this article for more http://css-tricks.com/absolute-positioning-inside-relative-positioning/

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

Sidebar

Related Questions

I have a simple XML extraction issue that should be solvable with straight PHP
One CSS rule I have learned is that you should use the relative em
My Website On the link above you can see that I have a CSS
I have a fairly straight-forward sequential approval workflow that has an EnableModificationActivity that is
I have this very straight forward question regarding Thread and Timer classes in Java
Have you tried using straight javascript (rather straight ECMAscript 3 standard) in Flex applications,
I have an object which straight forward instance variables. Some are NSString, some are
I have taken an example straight out of the MSDN. I want to create
I have recently posted another question which straight away users pointed me in the
I have SSRS report with its own datasets coming straight from the database. I

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.