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 trialCarlos Enrique Castañeda Gutiérrez
13,886 PointsChallenge: 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%;
}
}```
1 Answer
Trent Christofferson
18,846 Pointsby default it might have padding.
Carlos Enrique Castañeda Gutiérrez
13,886 PointsI 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;
} ```
Trent Christofferson
18,846 Pointsuse google chrome and select element where the space is using developer tools
Damien Watson
27,419 PointsDamien Watson
27,419 PointsLink is broken, can you supply code maybe?