How to change the p which is outside of div


#1

Hi,

Here is the code:

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.

CSS:

{
font-family:Garamond;
}
div>p
{
color:#7ac5cd;
}
body>p
{
color:#000000;
}

How to change the introduction and summary paragraph? I know this p is a immediate child of body, I tried but not working, kindly help…


#2

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