Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

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

styling navigation links with borders

Hi,

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
seal-mask
.a{fill-rule:evenodd;}techdegree
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,965 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%; }