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
Amnike Lashley
Courses Plus Student 276 PointsCSS Styling Question
How to I get the menu and logo to align besides each other in the header. I never understand this well.
For example: http://www.midnightpencils.com/style.png
3 Answers
Jacobus Hindson
14,429 PointsBrandon Escalante
5,772 PointsI'm not sure how you're code looks, but you can use Padding-Top: 1px; or Margin-Top: 1px; I'm not sure what it is you're exactly doing, so you'll have to decide what suites it best.
Martin Hesseler
4,572 PointsDo you want your logo on the left side and navigation pane on right, both being vertically aligned? In that case try...
<header>
<div id="logo">
<!-- your code -->
</div>
<nav>
<!-- your menu elements -->
</nav>
</header>
and
#logo {
float left;
}
nav {
float: right;
display: inline-block;
}
That is of course only ONE way to do it.
You should also read this article: Left Half and Right Half Layout
Amnike Lashley
Courses Plus Student 276 PointsAmnike Lashley
Courses Plus Student 276 PointsWhat code to use to give it some space off the top?