mattrc
4/24/2012 - 11:03 AM

CSS Nav Inline

CSS Nav Inline

/**
 * CSS Nav Inline
 */
body{ font-family: sans-serif }
ul {
  list-style: none;
  font-size: 0; /* SET UL FONT TO 0 */
}
ul > li{
  font-size: 16px; /* SET LI FONT TO 16px */
}

li {
  display: inline-block;
  zoom: 1;
  *display: inline;
  
  background: slategrey;
  padding: 0.25em;
  color: white;
}
<h1>fixed with font-size: 0</h1>
<p>via: http://twitter.com/#!/garand/status/183253526313566208</p>

<ul>
  <li>one</li>
  <li>two</li>
  <li>three</li>
<ul>

{"view":"separate","fontsize":"80","seethrough":"","prefixfree":"","page":"all"}