6. CSS Class selectors

hello I want to know if you could do it right? i don’t know why it work on . hero a{ I

I’m sorry I don’t understand what is your question ?

im sorry english is not my native language. my question is why the program let me pass when I put the code below: .hero a{ ? they say is correct I want to understand why? and also i put the code below . hero { and said that was wrong. thank you

mine works under .hero

Can you paste in your full CSS code

copy and paste you mean? if its that the answer is yes

Yes copy and paste in your code here in the forum so I can have a look

body {
height: 100%;
margin: 0;
text-align: center;
width: 100%;
}

h1 {
font-family: Palatino, ‘Palatino Linotype’, serif; font-size: 32px;
color: rbg(216,218,190);
}

h2 {
font-size: 56px;
}

.hero {
font-family: ‘Trebuchet MS’,
Helvetica, sans-serif;
padding:250px 0;
margin:30px;
}

p {
font-size: 2rem;
}

.hero a {
font-family: ‘Trebuchet MS’, Helvetica, sans-serif;
color: #00FFAA;
font-size: 1.25em;
text-decoration: none;
}

I’m not sure why, It works for me :slight_smile:

this is my code.

body {
height: 100%;
margin: 0;
text-align: center;
width: 100%;
}

h1 {
font-size: 32px;
font-family: Palatino, ‘Palatino Linotype’, serif;
color: rgb(121,149,117);
}

h2 {
font-size: 56px;
}

.hero {
background-image:url(“http://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-2/bg.jpg”);
background-size:cover;
font-family:‘Trebuchet MS’,Helvetica,sans-serif;
color:#ffffff;
padding: 250px 0;
margin: 30px;
}

p {
font-size:2rem
}

.hero a {
color: #00FFAA;
font-size: 1.25em;
text-decoration: none;
}
#footer{
font-size:0.75rem;
}

yes it’s works buddy thanks

This topic was automatically closed after 7 days. New replies are no longer allowed.