Code won't work for 'Can you swing it?'


#1


Oops, try again. Did you remember to set the color of the synopsis paragraph to #7AC5CD? This is another issue I've been having with color codes. Is my CSS in the correct order?


****************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>
****************************CSS**************************
/*Add your CSS below!*/
p {
    font-family: garamond;
    font-weight: bold;
    color:black;
    }

div > p {
    font-weight: bold;
    }    

body > p {
    color:#7AC5CD;
    font-weight; bold;
    }

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


#2

the synopsis paragraph is a direct child of div.

the introduction and summary paragraph are a direct child of body


#3

you should put -----font-weight: bold


#4

Is this an error in my HTML, CSS or both? Should rearrange like this, Body, P, Div, Ul?
Thanks


#5

don't tamper with your html code, that will make it impossible to pass the exercise

you can grab the direct children with >, then you can solve this problem purely with css.


#7

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