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

trying to get code formatting working

nav { 
  display: none; 
  width: 100%;
  background: #000;
  margin-left: -20px;
  padding-right: 40px;

5 Answers

got it :)

@shawn denham, you can also do inline code formatting by using backticks. Don't confuse these with apostrophes though! The button is usually in the very upper left corner of the keyboard (mine is below the escape button and is the same button as the tilde ~). Whatever you put between two backticks should become inline code. Like this!

Thanks Chris!

The back ticks were the only thing I could actually get working.

code bracket test

<code> nav { display: none; width: 100%; background: #000; margin-left: -20px; padding-right: 40px; } </code>

fail :(

James Barnett
James Barnett
39,199 Points

Treehouse uses markdown, as such no tags such as <code> will work.

Here's a handy guide to the various ways to format code here on the forum.

Thanks James! not sure where I got the idea that I could wrap it in <code></code> tags


  <p>my paragraph</p>


body {
  font-family: Verdana;
  font-size: 2em;
  margin: 10px;
James Barnett
James Barnett
39,199 Points

You need a blank between above the backticks to get the syntax highlighting correctly for the CSS.

James Barnett is there a list of supported languages for the syntax highlighting?

awesome! thanks! :+1:

James Barnett, yup! We're using Pygments, so we should support all those languages, but I can't really promise that all of them work. :smiley: