UL LI based menu : ul « Tags « HTML / CSS






UL LI based menu

   
?<!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" dir="ltr" lang="en-US"
  xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title></title>
<style rel="stylesheet" type="text/css">

#menu {
  padding: 0 90px 42px 298px;
  float: left;
}

#menu li {
  display: inline;
  list-style-type: none;
}

#menu li a {
  display: block;
  float: left;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: red;
  font-weight: bold;
  text-decoration: none;
  background-position: top left;
  background-repeat: no-repeat;
  margin: 0 1px 0 0;
  height: 31px;
  line-height: 31px;
  text-align: center;
}
</style>
</head>
<body>
        <ul id="menu">
          <li><a href="#" class="but1">HOME</a></li>
          <li><a href="#" class="but2">ABOUT US</a></li>
          <li><a href="#" class="but3">SALE</a></li>
          <li><a href="#" class="but4">RENTING</a></li>
          <li><a href="#" class="but5">CONTACTS</a></li>
        </ul>
</body>

</html>

   
    
    
  








Related examples in the same category

1.'ul' creates an unordered (bulleted) list
2.UL tag
3.Define class for UL for border (1px solid black) and padding (40px)
4.UL margin left and padding left
5.UL border bottom: 1px solid black
6.UL list style: none
7.UL width: 36%
8.UL text index: -1em
9.UL margin: 0
10.UL padding: 0 0 0 1em
11.Set margin for UL and LI
12.Use DIV to wrap a UL
13.Turn off list style
14.Left margin for list
15.Nested UL and LI tags
16.Add style to multi-level UL
17.turns off bullets for multi-level bullets
18.Add alignment line for UL
19.List with background
20.Advanced Lists: nested and ordered
21.ul margin-left: 40px; padding-left: 0px;
22.ul list-style-type: disc; list-style-image: url(bullet.gif);
23.ul padding: 0 0 0 1em;
24.UL width: 1000px;
25.UL float: left;
26.UL margin: 12px 0 1px 0;
27.UL display: block;
28.UL height: 25px;
29.UL LI based link list
30.UL float: right
31.UL for navigation
32.Setting style for UL inside a DIV
33.ul text-align: center;