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

Konrad Pilch
Konrad Pilch
2,435 Points

How do you do it? CSS Cutting

HI,

Aassume you have a 100px widht rectangle, and at the end of 25px you want to cut it like this , where the blue line is here in the link

I want to copy the effect assigned to services and contact on this site .

1 Answer

First make a regular rectangle and put your content in there. Then, use a ::before or ::after Pseudo element and position it absolute to where you want it. Might have to go into the minus with this. Then use a transform property to make it look like a triangle or similar. In this case, they use the transform property skew.

I recreated it in a very simple pen, here:

http://codepen.io/McSuckelaer/pen/jbxKzV

Take a look.

No probs. :)