Selecting "a" element


#1

Hello! I'm having a bit of trouble with selecting the "a" element and setting the color.
These are the instructions:
1.Make a new CSS rule that selects the a element inside <div class="learn-more">..</div>
2.Set the color to #00b0ff

Here is the code I have so far:

.learn-more {
    background-color: #f7f7f7;
    color: #00b0ff;
    }

but it keeps giving me an error message.
Any suggestions?


#2

There is nothing there that selects a elements.

Have a look at the very first CSS rule that you wrote. That selected the a elements in the nav div. Your task in this exercise if very similar.


#3

Ah. I see that now. I'm still wondering why I'm receiving an error message though. Any clue in the code?
Thanks!


#4

Could you show me all of your CSS code please?


#5

.nav a {
color: #5a5a5a;
font-size: 11px;
font-weight: bold;
padding-top: 14px; padding-bottom: 14px;
padding-left: 10px; padding-right: 10px;
text-transform: uppercase;
}
.jumbotron {
background-image: url('https://goo.gl/04j7Nn');
height: 500px;
}
.jumbotron h1 {
color: #fff;
font-size: 48px;
font-weight: bold;
font-family:'Shift', sans-serif;
}
.jumbotron p {
color: #fff;
font-size: 20px;
}

.learn-more {
background-color: #f7f7f7;

}

.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px
font-weight: bold;
}


#6

I don't see a CSS rule that selects a elements in the learn-more div.

Here is the selector that you need:

.learn-more a {

}

#7

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

.jumbotron {
height: 500px;
background-image: url('https://goo.gl/04j7Nn')
}

.jumbotron h1 {
color: #fff;
font size: 48px;
font weight: bold;
font-family: 'Shift', sans-serif;
}

.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px;
font-weight: bold;
}

.learn-more {
backgroung-color: #f7f7f7;

.jumbotron p {
color: #fff;
font-size: 20px;
}

.learn-more a {
color: #00b0ff;
}

I am getting the same error as stated above.
The error message is saying that my last css code is wrong.


#8

A couple of problems:

  • typing mistake: backgroung
  • there is also a missing }

#9

That got it. Thanks!


#10

Thank You very much! That worked! I will remember in the future.