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 trialKyle Clarke
4,680 PointsCSS LAYOUT
The logo is an <img>, so it displays inline with surrounding content by default. The logo displays on the same line as .main-nav and the auto margins have no effect on it.
i know the first two steps but last step is givin me a hard time
7 Answers
Ken Alger
Treehouse TeacherYou might try:
.logo {
display: block;
}
Remember too, that you can make your code less verbose by combining steps 1 & 2 into:
.main-nav li,
.main-nav {
display: inline-block;
}
Happy coding,
Ken
dangermin field
10,592 Points.main-nav li, .main-nav { display: inherit; }
Kyle Clarke
4,680 Pointsheader {
text-align: center;
}
.logo {
width: 110px;
margin: auto;
}
.main-nav li {
display: inline-block;
}
.main-nav li {
display: inline-block;
}
Kyle Clarke
4,680 PointsThe logo is an img
, so it displays inline with surrounding content by default. The logo displays on the same line as .main-nav and the auto margins have no effect on it. Place the .logo on a separate line by changing its display mode.
that's the full question.
Ken Alger
Treehouse TeacherFor task 2 you just want to be targeting .main-nav
and not the li
elements again.
Ken
Kyle Clarke
4,680 Pointsyes i did that but talk about task 3
Ken Alger
Treehouse TeacherOops. Sorry. Let me take another look.
Kyle Clarke
4,680 Pointsthanks ken...
Igor Gasperec
5,699 PointsJust change display to block .logo {display: block;}
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherKyle;
Can you post your code please?
Thanks,
Ken