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

can any one tell me how this code works

span:after{
  position:absolute;
  border:solid transparent;
  content:" ";
  height:0;
  width:0;
  right:100%;
  top:50%;
  border-right-color:#222;
  border-width:8px;
  margin-top:-8px;
  }

1 Answer

Steven Parker
Steven Parker
230,274 Points

There must be some special HTML and/or other CSS to go with this, it's hard to tell exactly what it will look like without it.

But by having all the borders transparent except the right one, this will produce a little almost-black triangle pointing left. I'm guessing the span itself might have position: relative, which would cause the little triangle to appear just left of the span.