8. can you swing it? (no)


<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
It keeps telling me I did not bold all summary and introduction paragraphs. Maybe it’s because I haven’t really got this whole “grandparent, parent, child” thing. I’ve been using numbers after tags ( < span1> ) to separate them so I can style specifically in CSS.

``` Ultimate Text Challenge Introduction: Cascading with CSS

Synopsis: When you set a property of a selector like 'p' to a certain value, that value applies to all p tags. If, however, you change that same property to a different value for a more specific instance of p, that change will override the 'general rule'.

  • If you say p { font-family: Garamond}, all 'p's will have the font Garamond.

  • BUT if you say li p {font-family: Verdana}, 'p's outside of 'li's will be in Garamond, and 'p's INSIDE 'li's will be in Verdana.

  • The more specific your selectors are, the higher importance CSS gives to the styling you apply!

Summary: Greater specificity makes CSS prioritize that particular styling.

p{ font-family: Garamond;} p1{ font-weight: bold} span p{ color:#7ac5cd; } ul{ color:#000000; text-decoration: underline; } span1{ font-weight:bold}
<do not remove the three backticks above>

Reset the exercise, and don’t temper with the html. You should use css only, otherwise is exercise is nearly impossible to pass. Read the information in the left column, about direct children (>)

I only tampered with the html to be able to figure out how to specifically bold the “Synposis” paragraph w/o editing the ul. I guess I’m asking for a better explanations as to how you’re supposed to nest family tags in the CSS style sheet.

But you shouldn’t tamper with the html at all. Synposis is a direct child of div

When I code div p{ font-style: underline} it ends up editing the whole ul.

font-style is so far i know not a valid css property.

Well, that will select all paragraphs somewhere inside a div, the paragraphs inside the list are still inside the div. You need to use > to grab direct children:

div > p 
1 Like

I meant text-decoration, whoops. Anyways you fixed my problem, thanks.