Can you swing it?


#1

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


#2

the synopsis paragraph you tried to grab (with div div p ) is wrong, they synopsis paragraph isn't nested in two divs, it is however the only direct child of div. You understand?


#3

/*Add your CSS below!*/
p {
font-family: Garamond;
}
body > p {
font-weight: bold;
}
p {
color: #7AC5CD;
}
div p {
color: #7AC5CD;
}
div li p{
color:#000000;
text-decoration: underline;
}

This is the code I used and it let me pass that chapter. hope this helps.


#4

A much simpler step would be:

p {font-family: Garamond}

body p {font-weight: bold}

div p {color: #7AC5CD}

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


#5

Yes, that would be a simpler solution, but it does not created the desired output (same for @xandman89 code)


#6

Thank you. Actually it does create the desired output as it follows the solution process step by step. @xandman89 code just repeats the color property under div and p where it could be a single step process.


#7

I had a lot of trouble with this lesson, until I reread the instructions several times and eventually made my way to the forum for some additional guidence.

Just wanted to thank you for your explaination of the problem user djank had in their code. It helped me to better understand my own error!


#8

nice one from xandman89, your steps make it more clearer to me. Thanks!


#9

xandman89 isn't good code, for two reasons:

p {
 color: #7AC5CD;
}

will make all paragraphs color #7AC5CD, where it should only make synopsis paragraph this color. Same story with div p, all is that noticeable because you give color #000000 to all paragraphs inside the list


#10

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