6. CSS Class selectors


#1

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


Lesson 6/10 css class selectors
#2

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


#3

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


#4

mine works under .hero

Can you paste in your full CSS code


#5

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


#6

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


#7

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;
}


#8

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


#9

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;
}


#10

yes it's works buddy thanks


#11

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