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 The Solution

Code works fine on here, but don't get same results typing into visual studio code. Typing line for line.

After watching these videos several times and typing the code line for line into visual studio code, even coping and pasting, I don't get nearly the same results. Also, the syntax seems to vary. What works on here doesn't work in my program.

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

Do you have a small example of 1 issue, the code and the confusing behavior?

3 Answers

For anyone that has trouble with this, make sure that you're copying all code from each of the three files (in this example, the .html and the two .css files).

Also — it's easy to forget, but — you'll want to make sure that the .css files are linked up correctly (i.e., ensure that the path is correct and that you've put the css files into their own directory and/or updated the path if the files are all in the root folder).

Note: Tried in multiple text editors, and appears to all be working as expected. Happy Coding! :thumbsup:

That's the thing, I'm not given any issues or errors, it just simply does not work on my end.

Dom Ss
Dom Ss
4,339 Points

I tried Guils method and it did work. You could also use :

grid-template-columns: repeat(3, 1fr) ;

This sets 3 columns. What's cool about it is that when you apply @media queries, all you have to do is to change the numers from 3 to 2 or to 1 depending on your needs on smaller devices.