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

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

matthewroller
matthewroller
2,159 Points

How come this piece of code words in my workspace, but not on another website?

Here is the following code, however it doesn't seem to recognize the nav area.

@media screen and (min-width:660px) {
  nav {
    background: none;
    float: right;
    font-size: 1.125em;
    margin-right: 5%;
    text-align: right;
    width: 45%;
  }
}

3 Answers

H- The "nav" tag is an html5 element, so check if your browser supports this or try opening up your website in another browser.

Kate Hoferkamp
Kate Hoferkamp
5,205 Points

Are you sure you have it linked to the html?

pauloliva
pauloliva
7,889 Points

Hey Matthew,

Just like Kate said. Make sure that whatever "other" website you are using, has a link to a CSS stylesheet where the code above should be placed in.