Skip to content

Instantly share code, notes, and snippets.

@theaccordance
Created May 9, 2013 22:58
Show Gist options
  • Select an option

  • Save theaccordance/5551238 to your computer and use it in GitHub Desktop.

Select an option

Save theaccordance/5551238 to your computer and use it in GitHub Desktop.
Method for creating a triangle using CSS
#ribbon-back {
border-color: transparent #660000 #660000 transparent; /* Triangle is created using two transparent sides for the border */
border-width: 16px; border-style: solid; /* Width is from the middle of the triangle */
width: 0; /* Important that the Div has no width */
height: 0; /* Important that the Div has no height */
position: relative;
left: 704px;
top: -16px;
z-index: -1; /* Used for depth placement */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment