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 trialLauren Stuckey
12,428 PointsIn these project files, how are the arrow shapes that display on the left side of the spans created?
I am trying to create a similar effect on a separate project that I'm working on, and was thinking I would have to use background images to get the desired shape. But I see that in these files, the rectangular shape with an arrow is somehow created in the CSS... I just can't figure out how or where it is being done.
3 Answers
Hugo Paz
15,622 PointsHi Lauren,
The Triangle is being created here - span:after
It's done through the border property. You can see more examples here
Lauren Stuckey
12,428 PointsGreat, that makes perfect sense. I had a feeling it had something to do with span:after but couldn't figure out what was going on. Thanks for the CSS Tricks link - very helpful!
Paolo Scamardella
24,828 PointsIf you have to create triangles with CSS, this site might help you. https://css-tricks.com/snippets/css/css-triangle/
Zeljko Porobija
11,491 PointsFor the future, just play a little with CSS code. For example, comment out some lines or change the values and see what happens. This is how you truly learn CSS and coding in general.
Lauren Stuckey
12,428 PointsLauren Stuckey
12,428 PointsSorry, I should have added the code within the question to make it a bit easier. The project files can be found by launching the workspace to jQuery basics, project 5, but I'll post them here as well.
Here's the markup:
And the styles: