Positioning elements for a tooltip - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Positioning elements for a tooltip

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--  w  w w  .j  a  va 2 s. c o m-->
   padding-left:6rem;
   padding-top:11rem;
}

.thelink {
   position:relative;
}

.image_hov {
   background-color:Chartreuse;
   display:none;
   padding:11px;
   position:absolute;
   top:-136px;
   z-index:100;
}

.thelink:hover .image_hov {
   display:block;
   margin-bottom:591px;
}
</style> 
 </head> 
 <body> 
  <p> <a title=" " href="http://www.google.com" class="thelink">Lorem ipsum dolor sit am<img src="https://www.java2s.com/style/demo/Opera.png" class="image_hov"> </a> </p> 
  <p> <a title=" " href="http://www.google.com" class="thelink">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorpe<img src="https://www.java2s.com/style/demo/Safari.png" class="image_hov"> </a> </p>  
 </body>
</html>

Related Tutorials