Share
View Edit Menu with CSS Visibility
According to the case posted by
devindamuka on daniweb.com. I'm trying to make it by CSS. We can view the edit menu using CSS visibility or display.
<html>
<head><title>View Edit Menu with CSS</title>
<style>
.comment{margin : 10px 0; width : 400px; border : 1px solid #000000; padding : 5px;}
.comment span{display : block; visibility : hidden;}
div:hover span{visibility : visible;}
</style>
</head>
<body>
<div class="comment" id="comment1">
<span id="menu1"><a href="edit.php?id=1">Edit</a></span>
Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1 Comment 1
</div>
<div class="comment" id="comment2">
<span id="menu2"><a href="edit.php?id=2">Edit</a></span>
Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2 Comment 2
</div>
<div class="comment" id="comment3">
<span id="menu3"><a href="edit.php?id=3">Edit</a></span>
Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3 Comment 3
</div>
</body>
</html>
See the result in
View edit menu with CSS visibility