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 trial

General Discussion

Im stuck on Select the class '.intro' and set its font weight to bold

This is all I could come up with and it's not working, below are is the style and index codes :(

style.css

h1{ color: blue }

p em{ color: red } }

main }

{ .intro } font-weight:bold }

index.html

<!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> <p> <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> <div id=main> <P class="intro"> </div> </body> </html>

http://teamtreehouse.com/library/websites/css-foundations-second-edition/selectors/basic-selectors-2

3 Answers

Your curly brackets are incorrect.

It should be:

.intro {
     font-weight: bold;
}

or in one line

.intro {font-weight: bold; }

Thanks but it failed to work!

Thanks!!!!!! finally got it to work after debugging for ages!

How did you debugg it?