Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrian7/4a9747fbffffc11c0221 to your computer and use it in GitHub Desktop.
Save adrian7/4a9747fbffffc11c0221 to your computer and use it in GitHub Desktop.
/* Centered Vertical Line - using CSS3 gradients */
.centered-vert-line(@startColor: transparent, @midColor: #ccc, @endColor: transparent, @deg: 180deg) {
background-image: -moz-linear-gradient(@deg, @startColor, @midColor, @endColor); // FF 3.6+
background-image: -webkit-linear-gradient(@deg, @startColor, @midColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(@deg, @startColor, @midColor, @endColor); // Opera 11.10
background-image: linear-gradient(@deg, @startColor, @midColor, @endColor); // Standard, IE10
background-position: 50%;
background-repeat: repeat-y;
background-size: 1px 1px;
}
/* Container */
div {
width: 50%;
height: 300px;
background-color: #fff;
border: 1px solid #ccc;
.centered-vert-line();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment