Check out the Latest Articles:
Tutorial #2: “Dog Eared” Tabs With One Image

In this tutorial, I’ll show you how to make a flexible set of navigation tabs with a single background image that allows you to use any set of colors for the inactive & active states. Hit “Continue Reading” for the video & code. Remember to view in HD for best quality.

View the finished version: Tutorial #2 Live Demo

Here is the base HTML for the page:

<h1>"Dog-eared" tabs</h1>
  <ul class="tabs">
    <li><a href="#">Main</a></li>
    <li><a href="#">Street</a></li>
    <li><a href="#">Weapon Shop</a></li>
    <li><a href="#">Item Shop</a></li>
    <li><a href="#">Travel</a></li>
    <li><a href="#">Recruit</a></li>
    <li><a href="#">FAQ</a></li>
    <li><a href="#">Talk</a></li>
    <li><a href="#">Top</a></li>
  </ul>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

And here is the final CSS (not including the reset file):

body { 
 padding:20px; 
 font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; 
}
 
h1, ul, p { 
  margin-bottom:1em; 
}
 
h1 { 
 font-size:1.4em; 
}
 
ul.tabs {
  border-bottom:1px solid #aaa;  
  list-style-type:none;
  overflow:hidden;  
}
 
ul.tabs li {  
  float:left; 
  margin-right:2px; 
}
 
ul.tabs li a {
  background:#ddd url(corner.png) top right no-repeat; 
  border-left:1px solid #aaa; 
  color:#333; 
  font-weight:bold; 
  display:block; 
  padding:4px 10px 2px 8px; 
  text-decoration:none; 
}
 
ul.tabs li a:focus, ul.tabs li a:hover { 
  background-color:#aaf; 
}
  • Share/Save/Bookmark


  1. xinuc on Wednesday 17, 2009

    Hi..

    great tutorial…

    keep it up bro…

    I will surely wait for more videos…

    thanks very much.

  2. Dani on Wednesday 17, 2009

    Thanks! That was very helpful.

  3. NewbyOneCanuby on Wednesday 17, 2009

    You are using” Blueprint”? Where is that available at?

  4. Montoya on Wednesday 17, 2009

    Blueprint is available here: http://blueprintcss.org