Exercise 8/Can you swing it?


#1

I looked at other posts about this but I can't find an answer. For the part where you underline the unordered list, the website won't accept my answer. Here is my CSS

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


#2

Try to use this

text-decoration: none;

#3

The Synopsis paragraph also has to be bold.

So make it:
div > p {
color: #7AC5CD;
font-weight: bold;
}


#4

1.) it's li > p, and 2.) there needs to be a semicolon after #000000

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


#5

i solved it by adding an id="" to the synopsis paragraph.


#6

I see some faulty answers
@capdefraa, the exercises asks you to use underline, then why should you use none?
@thehappyearthling, no, the instructions say the introduction and summary paragraph have to be bold, the synopsis (which is not the same) only has to have a color: #7AC5CD;
@microjumper09557, both ul p and li p are valid, both will target the paragraphs inside the unordered list. Your second point (the missing semi-colon) is absolutely spot on, well done
@recc42, the whole point of the exercise is to learn how to affect/grab direct children. It is unfortunate that you decide to use id.


#7

─░nstead of ul p{
Try: li p{


#8

Doesn't matter, both will grab the paragraph nested somewhere in the unordered or list tags, which are nested inside each other


#9

Wow thank you so much. I kept going over it to see if I missed any semicolons but I guess I missed it. And li p worked just as well but thank you.


#10

If I go:

ul > li {
color: example;
text-decoration: underline;
}

I noticed CodeCademy doesn't recognize this. I see that you have to reference the "lowest" of the children, in this case the p. Also in this case, if ul > li was allowed, the same text would be affected only. Why is it that we always have to reference the "lowest" of the children?


#11

the whole point of > is to grab only children nested directly inside that element if you have this:

<body>
  <p>i am affected</p>
  <div>
    <p>i am not</p>
  </div>
</body>

body > p { color: red } will only make the first paragraph red, because the first paragraph is a direct child of body, and the other paragraph is not. body p on the other hand, will target both paragraphs, because this affect any paragraph nested somewhere (no matter the parent) in body

ul > li would normally be fine, but the instructions explicit mention that you need to specify the paragraph in the css selector


#12

the last one should be
"div ul p{
color:#000000
text-decoration:underline;
}"


#13

as explained earlier already in this topic, there are multiply css selectors possible to target the paragraphs in question. I know you are correcting, but the semi-colon is still missing