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

CSS CSS Layout Basics CSS Layout Project Column Layout with Media Queries

Carlos Enrique Castañeda Gutiérrez
Carlos Enrique Castañeda Gutiérrez
13,886 Points

Challenge: White space below the ".main-nav" element?

Hello:

I completed the code challenge, but there is something I can't fix.

For a strange reason, there is a white space below my ".main-nav" element, it looks a little bit upper than ".name" element.

You can see my media query, below.

I saw Guil's solution and both elements are perfectly aligned, How Guil's achieve that? I couldn't figure out.

Thanks

@media (min-width: 769px) {
  .name {
    float:left;
  }

 .main-nav {
  float: right;
}

.main-nav li {
  display:inline-block;
  margin-left: 1.5em;
}

.container {
  width: 85%;
  margin: 0 auto;
}

.wrapper {
  width: 80%;
  margin: 0 auto;
}

.col {
  margin: 1em 2.3%;
  vertical-align: top;
}

.secondary {
    display: inline-block;
    width: 35%;
  }

.primary { 
    display: inline-block;
    width: 55%;
 }


}```
Damien Watson
Damien Watson
27,419 Points

Link is broken, can you supply code maybe?

1 Answer

by default it might have padding.

Carlos Enrique Castañeda Gutiérrez
Carlos Enrique Castañeda Gutiérrez
13,886 Points

I use the "normilize.css" to reset the CSS. The padding for ul, is zero. Any other possible reason?

ol, 
 ul {
  margin: 0;
  padding: 0;
  list-style: none;
} ```

use google chrome and select element where the space is using developer tools