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 trialAishah Griffin
5,476 PointsFollowing the directions from the positioning video, and I can not get my h1 inline with the ul.
I'm trying to get my h1 on the same line as the ul. any suggestions?
<header class="main-header">
<div class="container">
<h1 class="name">Aishah Griffin</h1>
<nav class="navigation">
<ul class="main-nav">
<li><a href="index.html">Home</a></li>
<li><a href="projects.html"> Projects</a></li>
<li><a href="contact.html"> Contact </a></li>
</ul>
</nav>
</div>
</header>
.name,
.main-nav,
.main-nav li
{
display: inline;
}
Aishah Griffin
5,476 PointsI'm following the "Positioning Elements side by side with inline display" video within the css layout basics.
Aishah Griffin
5,476 PointsShould I float to the left?
Aishah Griffin
5,476 Pointswhen I change it to this:
.name {
float: left;
}
.main-nav li {
float:right;
display: inline;
}
they're not displayed evenly
1 Answer
Julian Gutierrez
19,201 PointsLooks like Guil's code doesn't have the nav tag surrounding the unordered list that you included in your code.
Julian Gutierrez
19,201 PointsJulian Gutierrez
19,201 PointsWhat video are you following if you don't mind me asking? Floating your h1 will put both elements side by side.