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

question on layout css

Hi please take a look at my codepen below:

http://codepen.io/anon/pen/VYENOW

What Im trying to achieve is putting a div( in black) over the top of li(in yellow) so that when I hover over the black disappears and just leaves the yellow. I understand how to do that but my problem is with the layout.

Why won't the black div lay flush to the yellow list items I can't seem to work out why???? whats falsing the black div down a little so they are not flush together. thanks for your help in advance.

1 Answer

Hi Troy,

I was able to comment out the padding declaration for the .content a rule to achieve the effect you're looking for.

.content a {
  font-size: 30px;
  color: grey;
  /*padding: 10px 20px 10px 10px;*/
}

Hope this helps,

Cheers