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


TreeHouse citizen in need of CSS advice :D


Above is a very basic Lighthouse sketch I'm making CSS (yes I know it sucks!) and I'm having some real problems.

1) The stripes are getting me in serious distress! Is there an easy way to clip them so they fit nicely to an angled shape like this, trying to work out how to style them to fit otherwise is becoming far too fiddly? And I can't figure out why they won't rotate?

2) At the moment I have the trapezium like structure for some elements is there a way to add a linear gradient still?

3) For some (probably obvious to everyone else) the first stripe can't be moved without moving the entire body this seems to be the case with any type of positioning I try? eg If I add a margin the whole body drops

Cheers to anyone that can offer insights in advance

1 Answer

1, Create an empty div inside of whatever object you're using to make the piece you want the stripes to align on. You can add a class to it or not, then create your styles for the stripes, place it on there and give it a overflow property of hidden. This way any content extending over the ending line will be cut off, or hidden.

I can think about the others when I get back home later.

Thanks mate, I did try the overflow property but I don't think I applied it in the right places I'll give your method a go