A Pen By Airen

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


              <div id="nav_bar">
                <li> <a href="#">Home</a> </li>
                <li> <a href="#">Forums</a> </li>
                <li> <a href="#">Shipping Info</a> </li>
                <li> <a href="#">Contact us</a> </li>
                <li> <a href="#">About us</a> </li>


              #nav_bar {
     float: left;
     width: 100%;
     overflow: hidden;
     position: relative;
 #nav_bar ul {
     list-style-type: none;
     width: 565px;
      height: 50px;
     height: 100%;
     padding: 0;
     clear: left;
      float: left;
      position: relative;
      left: 50%;/*整个分页向右边移动宽度的50%*/
      text-align: center;
 #nav_bar li {
     margin: 0 5px;
     display: block;
     height: 50px;
     float: left;
     position: relative;
     right: 50%;/*将每个分页项向左边移动宽度的50%*/
 #nav_bar a:hover {
     background-color: #000000;
 #nav_bar a {
     height: 100%;
     line-height: 50px;
     padding: 0 1em 0 1em;
     background-color: #900000;


Loading ..................