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 CSS Layout Basics CSS Layout Project Creating and Styling the Layout Containers

Jonathan Buford
Jonathan Buford
2,065 Points

Why aren't my main nav links showing the space that the padding values I've given them are supposed to create?

1 Answer

The problem is that you have "comments" in your CSS file but they are written using a HTML syntax, this will break the rendering of the element.

CSS comments are written with a javascript comment syntax // one line comment /* multiline comment */

For future workspaces I suggest to download the files and open in a code editor such as Visual Code. Treehouse is great but of course they cannot make a code editor like VC. If you were to look at this code in a better text editor, the problem would be highlighted and obvious

.main-nav a { text-align: center; display: block padding: 10px 15px;

}

Jonathan Buford
Jonathan Buford
2,065 Points

Wow, thank you so much...I've been commenting with HTML syntax. That's funny you have mentioned that...I've been noticing how many bugs and stuff there are in workspaces and I've been thinking about using Sublime Text which is the editor I use that I really like.

Really appreciate your help!

Derek Chan
Derek Chan
3,110 Points

im still trying to understand how to do this.

ive downloaded the files in the downloads section but i cant seem to find any xcode file to open in my xcode program. im super new to coding, sorry for the noob question. just need some help :( thnx in advance!