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


Tracy Excell
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

styling navigation links with borders


I am working on a project and am trying to style my navigation links (in column form). I need them to have a white border / background and be separated by about 10px. I also want their width to take up most of the length of the device. My efforts are not working. Can anyone point me in the right direction? I have tried adding a width and margins, but it is not really working.

.nav li a { display: block; color: black; border: soild 2px white; background-color: white; padding: 10px; text-decoration:none;

Please try to show us code via snapshot of your workshop or paste your code on codepen

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

I agree with Siddhant Mehta . This is going to be easiest to troubleshoot if we can see your code. However, I can point out that the code you list here only targets the links inside the list items. Not the list items themselves. Also, you seem to be missing a closed curly brace. :sparkles:

2 Answers

Shane Oliver
Shane Oliver
19,977 Points

Without seeing the code I would say to give the nav items margin bottom and width you would need to target the UL LI excluding the anchor

UL LI { margin-bottom: 10px;  width: 100%; }