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

CSS

Commenting out

On one of the flexbox tutorials Guil commented out several lines of code. I think he used command /. It doesn't seem to work for me. What is the answer.

5 Answers

/*
      This is a comment
*/

Guil seemed to create this by selecting several lines of code and used command /. Is there a way of bracketing several lines without typing /* */

It depends on what OS you are using. Command / creates a comment in Mac, Control / creates a comment in Windows.

Comments in CSS placed inside /* ... */

You can read this article - https://css-tricks.com/snippets/css/comments-in-css/

Thank you for your answer. The control / works great in the workspaces but not at all using my text editor which is Microsoft Expression Web 4. What text editor would you recommend?

I suggest you Sublime Text with following plugins: PackageControl, SideBarEnhancements (!), SublimeCodeIntel (cool autocomplete), GitGutter (!), AutoFileName (autocomplete to filepaths), ColorHighlighter (highlight code of colors).

And also, nice to have, SublimeLinter (validator), SublimeLinter-contrib-eslint (validator), Jquery Snippet Pack, babel, babel-snippets, Javascript Snippets

Brackets is a free text editor that will handle the comments shortcuts.