background for ul and li : li background « Tags « HTML / CSS






background for ul and li

   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
ul {
    background: url(list-bkgd.gif) bottom;
    width: 298px;
    list-style: none;
    padding: 0 0 12px;
    margin: 0;
}
li {
    color: #eee;
    font-family: Verdana, Arial, Verdana, sans-serif;
    padding: 7px 7px 7px 20px;
    border-bottom: 1px solid #888;
    background: url(list-marker.gif) no-repeat 5px .8em;
}
</style>
</head>
<body>
  <ul>
    <li>Vivamus purus enim</li> 
    <li>Sollicitudin vitae</li>
    <li>Tincidunt sit amet</li> 
    <li>Pretium vel, libero</li> 
  </ul>
</body>
</html>

   
    
    
  








Related examples in the same category

1.LI background: url(search.gif) no-repeat;
2.Add list background image
3.Add different background image for each LI
4.li background: url(search_32.gif) no-repeat;
5.Li background-image