Home‎ > ‎blog‎ > ‎

Pure CSS tooltips

posted 6 Sep 2010, 15:16 by Andreas Jostel
a.info{ position:relative; /*this is the key*/}
a.info:hover{background-color:#ff0}
a.info span{display: none}
a.info:hover span{ /*the span will display just on :hover state*/
    display:block;
    z-index:999;
    position:absolute;
    top:20px; left:20px; width:150px;
    border:1px solid #0cf;
    background-color:#cff;
    color:#000;
    text-align: center}
Comments