Add list background image : li background « Tags « HTML / CSS






Add list background image

    



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Lists</title>
  <style type="text/css" media="screen">
  
  #fig1_1 ul {
    list-style: none;
    }    
  #fig1_1 li {
    background: url(bull.gif) no-repeat 0 50%;
    padding-left: 17px;
    }
  </style>
</head>

<body>

<div id="fig1_1">
  <ul>
    <li>Apples</li>
    <li>Spaghetti</li>
    <li>Green Beans</li>
    <li>Milk</li>
  </ul>
</div>


</body>
</html>

   
    
    
  








Related examples in the same category

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