CSS- link to an icon visible on hover -


i have icon display on top, right of div on hovering on div. code this:

<div class='edit_hover_class'>    <!-- code --> </div> 

and corresponding css file contains:

.edit_hover_class:hover {   background: url("trash.gif") no-repeat scroll right top; } 

i want attach link edit icon, possible plain css? if so, how?

you hide link until hover so:

<div class='edit_hover_class'>    <a href='#'><img src='icons/trash.gif' /></a> </div>  .edit_hover_class a{   visibility:hidden; } .edit_hover_class:hover {  visibility:visible; } 

see jsfiddle:

http://jsfiddle.net/auzm5/

or if want icon link, use css visibility:

http://jsfiddle.net/auzm5/1/


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -