Use UL and LI to create tab bar : tab « CSS Controls « HTML / CSS






Use UL and LI to create tab bar

   

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#tabContainer {
  padding: 25px 15px 0 15px;
  background: #67A897;
}

ul#topTab {
  list-style-type: none;
  width: 100%;
  position: relative;
  height: 27px;
  font-size: 13px;
  font-weight: bold;
  margin: 0;
  padding: 11px 0 0 0;
}

ul#topTab li {
  display: block;
  float: left;
  margin: 0 0 0 4px;
  height: 27px;
}

ul#topTab li.left {
  margin: 0;
}

ul#topTab li a {
  display: block;
  float: left;
  color: #fff;
  background: #4A6867;
  line-height: 27px;
  text-decoration: none;
  padding: 0 17px 0 18px;
  height: 27px;
}

ul#topTab li a.right {
  padding-right: 19px;
}

ul#topTab li a:hover {
  background: #2E4560;
}

ul#topTab li a.current {
  color: #2E4560;
  background: #fff;
}

ul#topTab li a.current:hover {
  color: #2E4560;
  background: #fff;
}
</style>
</head>
<body>
    <div id="tabContainer">
        <ul id="topTab">
            <li><a href="" title="Home" class="current">Home</a></li>
            <li><a href="" title="Home">Resources</a></li>
            <li><a href="" title="Home">Inspiration</a></li>
            <li><a href="" title="Home">Forums</a></li>
            <li><a href="" title="Home">About Us</a></li>
            <li><a href="" title="Home">Contact Us</a></li>
        </ul>
    </div>
</body>
</html>

   
    
  








Related examples in the same category

1.Simple Tab Menu
2.Tab menu with bottom bar highlight
3.Tab bar with bottom image
4.Anchor based tab
5.Dynamic tab without javascript
6.Horizontal tab bar
7.CSS only tab bar with content
8.Simple Tab Menu with UL LI
9.Tab list box
10.CSS tab
11.Image tab menu 1
12.Image tab menu 2
13.Image tab menu 3
14.Image tab menu 4
15.Image Tab menu 5
16.Image tab menu 6
17.Tab pages
18.Tab menu bar with image
19.Tab like top menu bar
20.Pure css based top tab menu
21.Footer with tab menu
22.Top tab menubar
23.Tab menu bar
24.Tab bar
25.Variable-Width Tab Navigation
26.Fixed-Width Tab Navigation
27.Tab like top layout bar
28.Card layout with top tab menu bar
29.Tab like top menu bar 2
30.Tab menu bar with round corner