We would like to know how to make a menu link with an image next to the text.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {<!-- www .j ava 2 s. c o m-->
list-style: none;
}
li:before {
content: "\A";
background: url('http://www.java2s.com/style/download.png') no-repeat 0px 0px/30px 30px;
padding: 8px 20px
}
li {
margin: 30px;
}
</style>
</head>
<body>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
The code above is rendered as follows: