What did I do wrong? lesson 8


#1

index.HTML

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Ultimate Text Challenge</title>
	</head>
	<body>
		<p>Introduction: Cascading with CSS</p>
		<div>
			<p>Synopsis: When you set a property of a selector like 'p' to a certain value, that value applies to <em>all</em> p tags.
			If, however, you change that same property to a different value for a more specific instance of p,
			that change will <em>override</em> the 'general rule'.
			</p>
			<ul>
				<li><p>If you say p { font-family: Garamond}, all 'p's will have the font Garamond.</p></li>
				<li><p>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.
				</p></li>
				<li><p>The more specific your selectors are, the higher importance CSS gives to the styling you apply!</p></li>
			</ul>
		</div>
		<p>Summary: Greater specificity makes CSS prioritize that particular styling.</p>
	</body>
</html>

Stylesheet.CCS

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

#2

you want all paragraphs to be Garamond, just use p as css selector to achieve this.

the synopsis paragraph isn't in the list, it is a direct child of div.

change ul to ul p, the exercise explicitly asks to specify the paragraph as part of the css selector


#3

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

Which one is still wrong?


#4

li is still wrong, the synopsis paragraph is a direct child of div (the first word of the paragraph indicates which term is used in the description)


#5

Like this?

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

#6

you only want to grab the direct child (paragraph inside the div in this case), which is what the exercise is about. (read the instructions), this code might pass, but isn't perfect yet


#8