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 CSS Layout Techniques Display

By default list items are placed on individual lines. Write a selector to target the list items with a class of .nav-btn

Full answer

/* Complete the challenge by writing CSS below */
.more li{
 display: none;;
li.nav-btn  {
  display: inline;
  width: 120px;
<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8">
    <title>CSS Layout</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
    <div class="container">
          <li class="nav-btn"><a href="#">Donuts</a></li>
                  <li class="nav-btn"><a href="#">Tea</a></li>
                  <li class="nav-btn"><a href="#">Coffee</a></li>
        <p>Donuts are sweet snacks usually deep fried from a flour dough. The best place to buy donuts is at a bakery or specialty donut shop. Donuts go great with coffee.</p>
        <a href="#">Read more</a>
        <p class="more">In this paragraph, you’ll learn lots more interesting facts about donuts. For example, did you know that the largest donut ever made was a jelly donut weighing more than one and a half tons? It measured 16 feet in diameter and 16 inches high in the center.</p>

1 Answer

Since the list items are the only elements with the class '.nav-btn' you only need to use that class as your selector. The 'li' is not needed. You may also want to check your display value, think about which value would place these elements side by side while also maintaining their block level status. The same selector concept goes for the first part of the challenge, you only need to use the class '.more' for the <p> element. It appears you put two semicolons behind your 'display: none;' declaration on that part as well. You only need one.