This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Biglizard0
over 8 years

I am stuck on "Can you swing it?".

Soo I read the instructions and everything, and I am still confused. So Codecademy.com community if anyone could tell me what “>” does. And maybe some more help cause I am super confused. TY ;)

Answer 55e7c666e39efee20f000348

1 vote

Permalink

This worked. (Sorry if formatting is funky. This is my first answer)

 p{
font-family: Garamond;

} body > p { font-weight: bold; } div > p { color: #7AC5CD; } li p { text-decoration:underline; color: #000000; }

points
Submitted by Stephanie Price
over 8 years

4 comments

Rafa Navarro over 8 years

Thank you!

prometeoargus over 8 years

Thanks Stephanie! :D

lkkrsnoepen over 8 years

thanks

yak78 over 8 years

man i did this, but i keep on getting it wrong, i even tried your way stephanie. what on earth is going on

Answer 55e8080a9376765cef00016b

1 vote

Permalink

@stephanie, that is indeed the correct code. check here how to format your code. That might improve your format for your next answer

@biglizard, do you understand why this is correct? Let’s make the example a lot easier, i made a bin. As you can see only the first paragraph is red. > only grabs direct children. So in case of body > p only paragraphs directly in the body are affected, the paragraph in the div is not affected because it is not a direct child of body (it is a direct child of div)

This exercise has both a synopsis and a summary paragraph, that might work confusing, but they are two different paragraphs. Study the html code, and maybe look back at exercise 6

hope this helps

points
Submitted by stetim94
over 8 years

2 comments

prometeoargus over 8 years

thanks!

stetim94 over 8 years

you’re welcome

Answer 55e91780d3292f8e65000252

0 votes

Permalink

Thank you both for the help ;). Now I understand it.

points
Submitted by Biglizard0
over 8 years

1 comments

stetim94 over 8 years

you’re welcome

Answer 5602823086f552b26f000226

0 votes

Permalink

A more neat form of code I guess:

    /*Add your CSS below!*/

p {
    color: #7AC5CD;
}

body > p {
    font-weight: bold;
    font-family: Garamond;
}

li > p {
    color: #000000;
    text-decoration: underline;
}

This is my first answer too, TD :D

points
Submitted by Damon Harris
over 8 years

2 comments

stetim94 over 8 years

This code is faulty (but i guess SCT approves it), it doesn’t match what the instructions tell you

Damon Harris over 8 years

Why not? The instructions just tell that what color the paragraph needs to be, there might be multiple solutions for an exercise, TD :)

Answer 5602c15d86f5528eed000119

0 votes

Permalink

@damon, true, there are multiply solution. However, understand that codecademy architecture allows everyone to write courses/SCT. So that SCT isn’t always airtight.

The instructions say all paragraphs should be font-family: Garamond; in your case, only the introduction and summary paragraph are Garamond.

The synopsis (which is not the same as the summary paragraph) should have a color of #7AC5CD in your case the introduction and summary paragraph also have this color.

So, i admit you are close, there are some flaws.

points
Submitted by stetim94
over 8 years

9 comments

Damon Harris over 8 years

Oh, I am still a newbie, Thanks!

stetim94 over 8 years

When i was a newbie here, i never heard of SCT, but slowly i got to know how it worked, and realized it isn’t always correct. And on this particular exercise, there are quite a few corner cases which SCT approves. Do you understand how you can improve your code?

Damon Harris over 8 years

I forgot to ask, what the hell is SCT!? lol :P

I don’t have any experience with web coding, but I do have a lot of experience with computer programming :)

stetim94 over 8 years

SCT stands for submission correctness test. It is the program/script which checks your code.

Damon Harris over 8 years

Oh, Where did you find the reference to it?

stetim94 over 8 years

i didn’t. Roy (one of the admins) told me. Everyone create a course + write SCT. But i can’t find that right now, hold on

Damon Harris over 8 years

Ok :)

stetim94 over 8 years

weird, i can’t find it. Maybe they have removed the feature, i will ask roy

Damon Harris over 8 years

No problem, It happens ;)