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 trialmrx3
8,742 PointsHaving some trouble with adding some space between my a href tags. Any help would be appreciated. (codepen included).
I'm just practicing making a float based layout. I have a section of code floated to the left, with the heading "various links." These links point to various teachers twitter accounts on teamtreehouse. The problem I'm having is that I can't add any "Whitespace" to the bottom of the links with css. I would be nice to give these links some "breathing space. I've tried attribute selectors but, nothing seems to work. Can any one help me figure out how to add some space to the bottom of the a href tags using css? The class name is floatLeft, and it starts on line 84 of my css Codepen. Thank you in advance for any help.
Codepen Link: http://codepen.io/mike316/pen/XJeLxB
2 Answers
kevin jordan
11,353 PointsMr X: Here's a forked pen of your code : http://codepen.io/anon/pen/WbZqmO
Basically I added all your a href s into an UL - like you did in your nav class. Then I used css to remove the styling from the LI.
Hope this helps ! kj
Richard Ling
8,522 PointsHi,
Have attached another codepen link: http://codepen.io/anon/pen/JorQwz
It's not particularly elegant (it's late, and I'm tired haha), but it works. I've wrapped your links in a container with class leftLinks, then added css to turn the inner a tags into block level elements. From there you can just adjust the bottom margin as required. I've also removed the br tags as they're no longer necessary.
Hope that moves you in the direction you were after! :)
Thanks, Rich
mrx3
8,742 PointsThank you Richard.
mrx3
8,742 Pointsmrx3
8,742 PointsThank you kj.