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!

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

HTML

Nathan Bentley
Nathan Bentley
12,680 Points

CSS mastery 2 of 10

Hi,

I am stuck on this task of ' using css, set the line height of the wrapper div to 32 pixels'

In style.css, I wrote .wrapper {line-height: 32px} and it is wrong. Can somebody care to explain where I am going wrong please? I played back a few clips many times and I still don't know! :(

Thanks

4 Answers

James Barnett
James Barnett
39,199 Points

@Nathan - You need to select the div with the id of wrapper.

Remember to select an id you need to prefix it with a #, as opposed to . which is used to select classes.

Nathan Bentley
Nathan Bentley
12,680 Points

Ahh... Thanks! I thought '.' was an alternative to '#'. Is there a way of typing this on keyboard without copying and pasting? (I never used twitter!) Cheers

James Barnett
James Barnett
39,199 Points

There are several important differences between classes and ids. Here's a blog post about the differences between classes and IDs.


How you type the # character depends on what sort of keyboard you have.

To quote Wikipedia:

On the standard US keyboard layout, the # symbol is Shift+3.

On standard UK and some European keyboards, the same keystrokes produce the pound currency symbol (£), and **# **is moved to a separate key above the right shift.

On UK Mac keyboards, # is generated by Opt +3, whereas on European Mac keyboards, the # can be found above the right shift key.

Nathan Bentley
Nathan Bentley
12,680 Points

Opt +3 works for me. Thanks!