2. Says "set the padding-top to 14px" but I thought I did


#1

 <div class="nav">
      <div class="container">
        <ul>
          <li><a href="#">Airbnb logo</a></li>
          <li><a href="#">Browse</a></li>
        </ul>
        <ul>
          <li><a href="#">Sign Up</a></li>
          <li><a href="#">Log In</a></li>
          <li><a href="#">Help</a></li>
        </ul>
      </div>
    </div>

    <div class="jumbotron">
      <div class="container">
        <h1>Find a place to stay.</h1>
        <p>Rent from people in over 34,000 cities and 192 countries.</p>
      </div>
    </div> 

    <div class="learn-more">
	  <div>
		<div>
	  	  <div>
			<h3>Travel</h3>
			<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
			<p><a href="#">See how to travel on Airbnb</a></p>
		  </div>
		  <div>
			<h3>Host</h3>
			<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
			<p><a href="#">Learn more about hosting</a></p>
		  </div>
		  <div>
			<h3>Trust and Safety</h3>
			<p>From Verified ID to our worldwide customer support team, we've got your back.</p>
			<p><a href="#">Learn about trust at Airbnb</a></p>
		  </div>
	    </div>
	  </div>
	</div>
  </body>
</html>

CSS:

.nav a {
    color: #5a5a5a;
    font-size: 11px;
    font-weight: bold;
    padding-bottom: 14px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 14px;
    text-transform: uppercase;
}

#2

Since the a tags are in the li tags, the li tags are controlling the padding not the a tags. I would create a separate style for the li and put your padding into that.

li{
  padding-bottom: 14px;
  padding-left:10px;
  padding-right:10px;
  padding-top:14px;
}
.nav a{
  color: #5a5a5a;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

Hope that helps :sunny:


#3

That definitely did something - the web preview now looks like its been formatted but it still won't let me progress and shows the same error message.... :confused:


#4

What is the error msg?


#5

"set the padding-top to 14px"


#6

On which element you need to add the padding?


#7

This is the lesson: it's 2: Navigate

In index.html, the

..
groups elements that are part of the navigation bar section of the web page. Inside
..
are the a elements we want to style.

Therefore, we can select all a elements inside

..
in CSS like this:

.nav a {
color: #5a5a5a;
font-size: 24px;
}
The CSS selector .nav a selects any a element nested inside an HMTL element with a class named "nav."
The color property sets the color of a element text to #5a5a5a.
The font-size property changes the size of a element text to 24px.
Instructions
In main.css:

Make a new CSS rule that selects all a elements nested inside

..
. Check out the example above.
Set the color to #5a5a5a. [some nav text to call back - Remember what color does]
Set the font-size to 11px
Set the font-weight to bold
Set the padding-top to 14px, and the padding-bottom to 14px
Set the padding-left to 10px, and the padding-right to 10px
Make the text uppercase using text-transform: uppercase;