Jump to content

Advertisment/definition description stuff


jojo_slash

Recommended Posts

Hi :) I found that some site(like eldergreek) will show advertisment when you put your mouse arrow over some definition words and the advertisment describe the word. How do they do that? Is it possible to do that just using html? Please advise. Thanks! :)

Link to comment
Share on other sites

there are several ways to do this, most commonly it is done with javascript but it can be done with CSS.

a.tooltip {  z-index:24;  color:#FF5E2F;  position:relative;  border-bottom:1px dashed #FF5E2F;  text-decoration:none;}a.tooltip:hover {  z-index:25;  color:#7a7a7a;  border-bottom:1px dashed #7a7a7a;  text-decoration:none;}a.tooltip span {  display:none;}a.tooltip:hover span {  position:absolute;  top:2em;  left:0em;  border:1px solid #F0D070;  padding:3px;  display:block;  width:245px;  color:#D0A010;  background-color:#FFFFE4;}On the text you want to tooltip you add a link (HREF) with a hidden SPAN tag, like so: <a class="tooltip" href="#">This text is shown and gets a tooltip<span>This text is shown on hovering the link</span></a>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...