Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChad Z
2,320 PointsCss challenge 6: Select the class intro and set its font weight to bold.
I'm stuck on this problem. Plz help asap. Other people have tried this and have not find a solution. Please give me a answer for this challenge. Here's the link to the challenge: http://teamtreehouse.com/library/websites/css-foundations-2/selectors-reshoot/type-class-and-id-selectors
10 Answers
Nabil Kamel
7,170 Pointsand the css:
/* Complete the challenge by writing CSS below */
body {
background: lightblue;
}
h1 {
color: darkblue;
}
p em {
color: red;
}
.intro {
font-weight: bold;
}
Nabil Kamel
7,170 Points.intro { font-weight: bold; }
Chad Z
2,320 Pointsthat doesnt work i did this and it says there's a error
Nabil Kamel
7,170 Pointshave you correctly added the intro class on the p element of your HTML ?
<p class="intro">
Chad Z
2,320 Pointsyes
Nabil Kamel
7,170 Pointsthen you should start over. refresh your browser, sure something went wrong
Chad Z
2,320 Pointscan u just show me how the html should look like. idk how to show u what i did
Chad Z
2,320 Pointsidk how to post the picture
Chad Z
2,320 Pointsi did p class="intro" with the curly braces. Btw i tried resfrehsing thw broswer it doesnt work
Nabil Kamel
7,170 Pointsif you succeeded the 5 first steps, then your HTML should be correct.
Nabil Kamel
7,170 Pointswhat's the error message you get ?
Nabil Kamel
7,170 Pointsthis is how your HTML should look like:
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors</title>
<link rel="stylesheet" href="cc1-main-styles.css" type="text/css" media="screen">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body>
<h1><em>Hello</em> World!</h1>
<div id="main">
<p class="intro">
<em>Lorem ipsum dolor</em> sit amet, consectetur adipiscing elit. Nunc pulvinar consequat tortor, nec venenatis erat elementum scelerisque. Curabitur sit amet risus nisi. Aenean aliquet euismod augue at viverra. Ut varius arcu in lorem iaculis ullamcorper. Integer eu rutrum quam.
</p>
</div>
</body>
</html>
Chad Z
2,320 Pointsthats exaclty what i did
Nabil Kamel
7,170 Pointssorry the id="main" should go on the div and not body
Chad Z
2,320 Pointsthank you
Nabil Kamel
7,170 Pointsdid it work ?
Chad Z
2,320 Pointsyes it did and btw how to post the picture of the html and css?
Nabil Kamel
7,170 Pointswrap your code between three backticks on each side of your code: `
Chad Z
2,320 Pointsok
Nabil Kamel
7,170 Pointscheck the Markdown Cheatsheet just above the text area