Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Wordpresss navbar spacing problems

I am trying to style my Nav links but there is weird spacing between my links. I can't figure out what it is. Here is my code:

<header> <div class='container static-nav'> <div class='col-sm-5'>

    <div class='col-sm-7 main-nav'>  
      <nav class="nav-collapse">
              $args = array(
                'menu'        => 'header-menu',
                'menu_class'  => '',
                'container'   => 'false'
              wp_nav_menu( $args );


@media (min-width: 768px) {
  background: #fff;
  color: #fff;
  height: 100%;
.main-nav ul{
  float: right;
  width: auto;
.main-nav ul li{
  display: inline-block;
  width: auto;
  height: 100%;
  background: #333;
  margin: 0;
.main-nav ul li a{
  line-height: 60px;
  padding: 1em;
  color: #fff;

@media (max-width: 768px){
.container > .main-nav{
  margin: 0px;
  padding: 0px;

The weird spacing is shown here: https://photos-2.dropbox.com/t/2/AAAlkyS__VaYuee1L1bNFYqnayZH4eLPUwk7PkYuKJg3ew/12/380097602/jpeg/1024x768/3/1429758000/0/2/Untitled-1.jpg/CMKon7UBIAEgAiADKAE/x5U3IrfMNfo43sR8lzkW52rApy0568swGNRsUrAK1-k

Hi Brennan,

The drop box link gives a 404 error.

Are you using bootstrap here?

What is this weird spacing issue? Do you have gaps between your list items that are about 4 or 5px?

1 Answer

Exactly! I fixed it by giving the ul a font-size 0 and it seemed to fix it.